From 6d3336b7ea9e7f7f9ad48d987ecc5ada7bda73dc Mon Sep 17 00:00:00 2001 From: yugecin Date: Sun, 28 May 2017 18:44:16 +0200 Subject: [PATCH] option menu: fix dropdowns being clicked when clicking overlayed navigation button --- src/yugecin/opsudance/ui/OptionsOverlay.java | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/yugecin/opsudance/ui/OptionsOverlay.java b/src/yugecin/opsudance/ui/OptionsOverlay.java index 02933ffe..9782df7d 100644 --- a/src/yugecin/opsudance/ui/OptionsOverlay.java +++ b/src/yugecin/opsudance/ui/OptionsOverlay.java @@ -778,15 +778,17 @@ public class OptionsOverlay extends OverlayOpsuState { isAdjustingSlider = false; sliderOptionLength = 0; - if (openDropdownMenu != null) { - openDropdownMenu.mouseReleased(button); - updateHoverOption(x, y); - return true; - } else { - for (DropdownMenu menu : visibleDropdownMenus) { - menu.mouseReleased(button); - if (menu.isOpen()) { - return true; + if (x > navWidth) { + if (openDropdownMenu != null) { + openDropdownMenu.mouseReleased(button); + updateHoverOption(x, y); + return true; + } else { + for (DropdownMenu menu : visibleDropdownMenus) { + menu.mouseReleased(button); + if (menu.isOpen()) { + return true; + } } } }