mojira.dev
MC-103276

Selection menu graphical glitch (touchscreen mode)

The bug

When in the world, or resource-pack selection, if your mouse cursor is on the arrows or to the left of the arrows, all of them will be shown as selected. Only one at a time should look selected.

Code analysis by sjx233 in this comment

Linked issues

Attachments

Comments

Mustek

Thank you for your report.
However, your ticket has been resolved as awaiting response.

We currently do not have enough information to troubleshoot your issue.
Please force a crash by pressing F3 + C for 10 seconds while in-game and attach the crash report ([minecraft/crash-reports/crash-<DATE>-client.txt|http://hopper.minecraft.net/help/finding-minecraft-data-folder]) here.

Your report will be reopened or properly resolved as soon as we receive this information.

Kyiiel

Can only use debug crash while a world is loaded, not in the main menu. I added a debug crash anyway though.

Mustek

This one is odd. I see you have a resourcepack enabled, could you disable that and see if the issue persists?

Kyiiel

The issue still persists, Would you like me to add another crash log without the resource pack enabled?

Mustek

Nope, does it also happen on restart?

Kyiiel

Yes.

Mustek

Could you attach the servers.dat file in C:\Users\<username>\AppData\Roaming\.minecraft
I've a feeling that there's invalid data in those.

Kyiiel

Changed title to reflect that all menus with multiple selection seem to have this issue.

Kyiiel

Added servers.dat

kumasasa

OpenGL: GeForce GTX 480/PCIe/SSE2 GL version 4.5.0 NVIDIA 365.19, NVIDIA Corporation

Please update your graphics drivers to version 368.39

Mustek

Okay, that file is fine.
If you want to change the window size (drag it around) and see if that fixes it.

kumasasa

⚠️ Please attach your options.txt first!

kumasasa

touchscreen:true ?
You are on a touchscreen device ?

Kyiiel

@Kumasasa Sorry, I updated my graphics drivers first because I didn't see your post, and restarted my PC. The issue still persists. I then uploaded options.txt.

Resizing the window and changing the size of the window (even through F11) does not resolve the issue.

Mustek

Confirmed by us both that it's related to the touchscreen option being enabled.

kumasasa

@unknown: What has this to do with touchscreen mode ? This is MC-32606

bob

Is this still an issue in the latest snapshot 16w44a? If so please update the affected versions.

This is an automated comment on any open or reopened issue with out-of-date affected versions.

wobst.michael

Cannot reproduce.

Is this still an issue in the most recent versions (currently that is 1.11.2, or 17w06a) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time. If you are the owner/reporter of this ticket, you can modify the affected version(s) yourself.

Kyiiel

@Michael Wobst This is still an issue in 1.11.2. But I no longer sure this is a bug. Touchscreen mode was not designed for a mouse (obviously) and I don't have a touchscreen to test it with. If someone can confirm that this does not happen with touchscreens, then this should be closed as invalid. If it does happen with touchscreens, then it's still a bug.

Kyiiel

Also, can a mod remove Untitled.png, as it doesn't relate to the bug.

sjx

Still an issue in 1.13.

Code analysis

Please link to this comment in the description.

The following is based on the decompiled version of Minecraft 1.13.

In net.minecraft.client.gui.GuiListWorldSelectionEntry

public void drawEntry(int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partialTicks)
{
    int y = this.getY();
    int x = this.getX();
    // ...
    if (this.client.gameSettings.touchscreen || isSelected)
    {
        // ...
        int j = mouseX - x;
        int i = j < 32 ? 32 : 0;

        if (this.worldSummary.markVersionInList())
        {
            Gui.drawModalRectWithCustomSizedTexture(x, y, 32.0F, (float)i, 32, 32, 256.0F, 256.0F);
            // ...
        }
        else
        {
            Gui.drawModalRectWithCustomSizedTexture(x, y, 0.0F, (float)i, 32, 32, 256.0F, 256.0F);
        }
    }
    // ...
}

It seems that whether the mouse is actually on the arrow is never checked.

Solution

In net.minecraft.client.gui.GuiListWorldSelectionEntry, net.minecraft.client.gui.ServerListEntryNormal and net.minecraft.client.resources.ResourcePackListEntryFound, check if the entry isSelected before rendering colored arrows.

JUE13

Can confirm for 19w34a.

pulpetti

Still in 1.16.1 and 20w29a.

Kyiiel

(Unassigned)

Confirmed

(Unassigned)

touchscreen

Minecraft 1.10, Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w17a, Minecraft 17w17b, ..., 20w15a, 1.16.5, 1.17 Release Candidate 1, 1.21.4, 25w02a

Retrieved