From 50cd209b6794af521ad3782f410d47e0ae96d50c Mon Sep 17 00:00:00 2001 From: yugecin Date: Sun, 8 Jul 2018 11:01:49 +0200 Subject: [PATCH] options: don't capture mouse events that are not in the overlay --- src/yugecin/opsudance/ui/OptionsOverlay.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/yugecin/opsudance/ui/OptionsOverlay.java b/src/yugecin/opsudance/ui/OptionsOverlay.java index 4a92e06c..a4e23d92 100644 --- a/src/yugecin/opsudance/ui/OptionsOverlay.java +++ b/src/yugecin/opsudance/ui/OptionsOverlay.java @@ -793,7 +793,7 @@ public class OptionsOverlay implements ResolutionChangedListener { } public boolean mousePressed(int button, int x, int y) { - if (!this.active) { + if (!this.active || x > this.currentWidth) { return false; } @@ -822,7 +822,7 @@ public class OptionsOverlay implements ResolutionChangedListener { } public boolean mouseReleased(int button, int x, int y) { - if (!this.active) { + if (!this.active || x > this.currentWidth) { return false; } @@ -922,7 +922,7 @@ public class OptionsOverlay implements ResolutionChangedListener { } public boolean mouseWheelMoved(int delta) { - if (!this.active) { + if (!this.active || mouseX > this.currentWidth) { return false; }