option menu: fix dropdowns being clicked when clicking overlayed navigation button

This commit is contained in:
yugecin 2017-05-28 18:44:16 +02:00
parent 7f37a51c48
commit 6d3336b7ea

View File

@ -778,15 +778,17 @@ public class OptionsOverlay extends OverlayOpsuState {
isAdjustingSlider = false; isAdjustingSlider = false;
sliderOptionLength = 0; sliderOptionLength = 0;
if (openDropdownMenu != null) { if (x > navWidth) {
openDropdownMenu.mouseReleased(button); if (openDropdownMenu != null) {
updateHoverOption(x, y); openDropdownMenu.mouseReleased(button);
return true; updateHoverOption(x, y);
} else { return true;
for (DropdownMenu<Object> menu : visibleDropdownMenus) { } else {
menu.mouseReleased(button); for (DropdownMenu<Object> menu : visibleDropdownMenus) {
if (menu.isOpen()) { menu.mouseReleased(button);
return true; if (menu.isOpen()) {
return true;
}
} }
} }
} }