let the parent draw UI, fix SBoverlay input events
This commit is contained in:
parent
da65270ab0
commit
03ef993a18
|
@ -175,6 +175,7 @@ public class OptionsMenu extends BasicGameState implements OptionsOverlay.Parent
|
|||
|
||||
int mouseX = input.getMouseX(), mouseY = input.getMouseY();
|
||||
optionsOverlay.render(g, mouseX, mouseY);
|
||||
UI.draw(g);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -136,7 +136,6 @@ public class OptionsOverlay {
|
|||
|
||||
// UI
|
||||
UI.getBackButton().draw();
|
||||
UI.draw(g);
|
||||
|
||||
// tooltip
|
||||
renderTooltip(g, mouseX, mouseY);
|
||||
|
|
|
@ -247,7 +247,7 @@ public class SBOverlay implements OptionsOverlay.Parent {
|
|||
}
|
||||
|
||||
public boolean mousePressed(int button, int x, int y) {
|
||||
if (menu) {
|
||||
if (!menu) {
|
||||
return false;
|
||||
}
|
||||
overlay.mousePressed(button, x, y);
|
||||
|
@ -255,7 +255,7 @@ public class SBOverlay implements OptionsOverlay.Parent {
|
|||
}
|
||||
|
||||
public boolean mouseDragged(int oldx, int oldy, int newx, int newy) {
|
||||
if (menu) {
|
||||
if (!menu) {
|
||||
return false;
|
||||
}
|
||||
overlay.mouseDragged(oldx, oldy, newx, newy);
|
||||
|
@ -278,7 +278,7 @@ public class SBOverlay implements OptionsOverlay.Parent {
|
|||
}
|
||||
|
||||
public boolean mouseReleased(int button, int x, int y) {
|
||||
if (menu) {
|
||||
if (!menu) {
|
||||
return false;
|
||||
}
|
||||
overlay.mouseReleased(button, x, y);
|
||||
|
|
Loading…
Reference in New Issue
Block a user