option overlay should not ignore mouse release event when mouse down
event was in bounds
This commit is contained in:
parent
afef2e457c
commit
787ad8c522
|
@ -144,6 +144,8 @@ public class OptionsOverlay implements ResolutionChangedListener {
|
|||
|
||||
private int mousePressY;
|
||||
|
||||
private boolean wasPressed;
|
||||
|
||||
private boolean keyEntryLeft;
|
||||
private boolean keyEntryRight;
|
||||
|
||||
|
@ -797,6 +799,8 @@ public class OptionsOverlay implements ResolutionChangedListener {
|
|||
return false;
|
||||
}
|
||||
|
||||
wasPressed = true;
|
||||
|
||||
if (keyEntryLeft || keyEntryRight) {
|
||||
keyEntryLeft = keyEntryRight = false;
|
||||
return true;
|
||||
|
@ -822,10 +826,12 @@ public class OptionsOverlay implements ResolutionChangedListener {
|
|||
}
|
||||
|
||||
public boolean mouseReleased(int button, int x, int y) {
|
||||
if (!this.active || x > this.currentWidth) {
|
||||
if (!this.active || (!wasPressed && x > this.currentWidth)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
wasPressed = false;
|
||||
|
||||
selectedOption = null;
|
||||
if (isAdjustingSlider && listener != null) {
|
||||
listener.onSaveOption(hoverOption);
|
||||
|
|
Loading…
Reference in New Issue
Block a user