Skip to content

Commit

Permalink
Fix #696
Browse files Browse the repository at this point in the history
Better fix that doesn't CME when entries with many pages are clicked 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 106a9c7 commit 5a04005
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 5a04005

Please sign in to comment.