option overlay should not ignore mouse release event when mouse down
event was in bounds
This commit is contained in:
parent
afef2e457c
commit
787ad8c522
|
@ -143,6 +143,8 @@ public class OptionsOverlay implements ResolutionChangedListener {
|
||||||
private int maxScrollOffset;
|
private int maxScrollOffset;
|
||||||
|
|
||||||
private int mousePressY;
|
private int mousePressY;
|
||||||
|
|
||||||
|
private boolean wasPressed;
|
||||||
|
|
||||||
private boolean keyEntryLeft;
|
private boolean keyEntryLeft;
|
||||||
private boolean keyEntryRight;
|
private boolean keyEntryRight;
|
||||||
|
@ -796,6 +798,8 @@ public class OptionsOverlay implements ResolutionChangedListener {
|
||||||
if (!this.active || x > this.currentWidth) {
|
if (!this.active || x > this.currentWidth) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wasPressed = true;
|
||||||
|
|
||||||
if (keyEntryLeft || keyEntryRight) {
|
if (keyEntryLeft || keyEntryRight) {
|
||||||
keyEntryLeft = keyEntryRight = false;
|
keyEntryLeft = keyEntryRight = false;
|
||||||
|
@ -822,9 +826,11 @@ 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 || x > this.currentWidth) {
|
if (!this.active || (!wasPressed && x > this.currentWidth)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wasPressed = false;
|
||||||
|
|
||||||
selectedOption = null;
|
selectedOption = null;
|
||||||
if (isAdjustingSlider && listener != null) {
|
if (isAdjustingSlider && listener != null) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user