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

View File

@@ -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;
}