options: don't capture mouse events that are not in the overlay

This commit is contained in:
yugecin 2018-07-08 11:01:49 +02:00
parent ab6aa75f8b
commit 50cd209b67
No known key found for this signature in database
GPG Key ID: 2C5AC035A7068E44

View File

@ -793,7 +793,7 @@ public class OptionsOverlay implements ResolutionChangedListener {
} }
public boolean mousePressed(int button, int x, int y) { public boolean mousePressed(int button, int x, int y) {
if (!this.active) { if (!this.active || x > this.currentWidth) {
return false; return false;
} }
@ -822,7 +822,7 @@ public class OptionsOverlay implements ResolutionChangedListener {
} }
public boolean mouseReleased(int button, int x, int y) { public boolean mouseReleased(int button, int x, int y) {
if (!this.active) { if (!this.active || x > this.currentWidth) {
return false; return false;
} }
@ -922,7 +922,7 @@ public class OptionsOverlay implements ResolutionChangedListener {
} }
public boolean mouseWheelMoved(int delta) { public boolean mouseWheelMoved(int delta) {
if (!this.active) { if (!this.active || mouseX > this.currentWidth) {
return false; return false;
} }