fix pressing back button on options overlay responding to mousepress instead of mouserelease

This commit is contained in:
yugecin 2017-01-27 20:56:44 +01:00
parent 194e41189e
commit 1fab72d5a4

View File

@ -429,9 +429,6 @@ public class OptionsOverlay extends OverlayOpsuState {
}
}
if (UI.getBackButton().contains(x, y)) {
hide();
}
return true;
}
@ -476,10 +473,12 @@ public class OptionsOverlay extends OverlayOpsuState {
tScrollOffset += tab.options.length * optionHeight;
}
if (UI.getBackButton().contains(x, y) && listener != null) {
if (UI.getBackButton().contains(x, y)){
hide();
if (listener != null) {
listener.onLeaveOptionsMenu();
}
}
return true;
}