Skip to content

Commit

Permalink
Better fix that doesn't CME when entries with many pages are clicked …
Browse files Browse the repository at this point in the history
…too fast. Previous fix caused other buttons to still iterate after one was handled, rather than returning and just handling the last widget.
  • Loading branch information
alcatrazEscapee committed Nov 2, 2023
1 parent 095638f commit 33b3373
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,15 @@ public boolean mouseClickedScaled(double mouseX, double mouseY, int mouseButton)
}
}

return super.mouseClicked(mouseX, mouseY, mouseButton);
for(GuiEventListener listener : children()) {
if (listener.mouseClicked(mouseX, mouseY, mouseButton)) {
if (mouseButton == GLFW.GLFW_MOUSE_BUTTON_LEFT) {
setDragging(true);
}
return true;
}
}
return false;
}

@Override
Expand Down

0 comments on commit 33b3373

Please sign in to comment.