fix overlay event dispatch ordering in game
This commit is contained in:
parent
d7e59531ea
commit
4a69f1d9b3
|
@ -713,13 +713,13 @@ public class Game extends ComplexOpsuState {
|
||||||
displayContainer.cursor.draw(Utils.isGameKeyPressed());
|
displayContainer.cursor.draw(Utils.isGameKeyPressed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
super.render(g);
|
||||||
|
|
||||||
if (OPTION_DANCE_ENABLE_SB.state) {
|
if (OPTION_DANCE_ENABLE_SB.state) {
|
||||||
optionsOverlay.render(g);
|
optionsOverlay.render(g);
|
||||||
}
|
}
|
||||||
|
|
||||||
UI.draw(g);
|
UI.draw(g);
|
||||||
|
|
||||||
super.render(g);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1102,11 +1102,11 @@ public class Game extends ComplexOpsuState {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean keyPressed(int key, char c) {
|
public boolean keyPressed(int key, char c) {
|
||||||
if (super.keyPressed(key, c)) {
|
if (OPTION_DANCE_ENABLE_SB.state && optionsOverlay.keyPressed(key, c)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OPTION_DANCE_ENABLE_SB.state && optionsOverlay.keyPressed(key, c)) {
|
if (super.keyPressed(key, c)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1242,20 +1242,22 @@ public class Game extends ComplexOpsuState {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean mouseDragged(int oldx, int oldy, int newx, int newy) {
|
public boolean mouseDragged(int oldx, int oldy, int newx, int newy) {
|
||||||
if (super.mouseDragged(oldx, oldy, newx, newy)) {
|
if (OPTION_DANCE_ENABLE_SB.state &&
|
||||||
|
optionsOverlay.mouseDragged(oldx, oldy, newx, newy))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return OPTION_DANCE_ENABLE_SB.state &&
|
|
||||||
optionsOverlay.mouseDragged(oldx, oldy, newx, newy);
|
return super.mouseDragged(oldx, oldy, newx, newy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean mousePressed(int button, int x, int y) {
|
public boolean mousePressed(int button, int x, int y) {
|
||||||
if (super.mousePressed(button, x, y)) {
|
if (OPTION_DANCE_ENABLE_SB.state && optionsOverlay.mousePressed(button, x, y)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OPTION_DANCE_ENABLE_SB.state && optionsOverlay.mousePressed(button, x, y)) {
|
if (super.mousePressed(button, x, y)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1360,11 +1362,11 @@ public class Game extends ComplexOpsuState {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean mouseReleased(int button, int x, int y) {
|
public boolean mouseReleased(int button, int x, int y) {
|
||||||
if (super.mouseReleased(button, x, y)) {
|
if (OPTION_DANCE_ENABLE_SB.state && optionsOverlay.mouseReleased(button, x, y)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OPTION_DANCE_ENABLE_SB.state && optionsOverlay.mouseReleased(button, x, y)) {
|
if (super.mouseReleased(button, x, y)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1393,11 +1395,11 @@ public class Game extends ComplexOpsuState {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean keyReleased(int key, char c) {
|
public boolean keyReleased(int key, char c) {
|
||||||
if (super.keyReleased(key, c)) {
|
if (OPTION_DANCE_ENABLE_SB.state && optionsOverlay.keyReleased(key, c)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OPTION_DANCE_ENABLE_SB.state && optionsOverlay.keyReleased(key, c)) {
|
if (super.keyReleased(key, c)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1434,11 +1436,11 @@ public class Game extends ComplexOpsuState {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean mouseWheelMoved(int newValue) {
|
public boolean mouseWheelMoved(int newValue) {
|
||||||
if (super.mouseWheelMoved(newValue)) {
|
if (OPTION_DANCE_ENABLE_SB.state && optionsOverlay.mouseWheelMoved(newValue)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OPTION_DANCE_ENABLE_SB.state && optionsOverlay.mouseWheelMoved(newValue)) {
|
if (super.mouseWheelMoved(newValue)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user