Quality of live improvement

This commit is contained in:
Felix Koppe
2024-12-09 16:10:15 +01:00
parent de0f04b5b7
commit 39d5b43cb8
2 changed files with 6 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ public class GameView extends MdgaView {
private FilterPostProcessor fpp; private FilterPostProcessor fpp;
public boolean needConfirm = false; public boolean needConfirm = false;
public boolean needNoPower = false;
private Node guiHandlerNode = new Node(); private Node guiHandlerNode = new Node();
@@ -131,10 +132,13 @@ public void noConfirm() {
public void showNoPower() { public void showNoPower() {
confirmButton.hide(); confirmButton.hide();
noPowerButton.show(); noPowerButton.show();
needNoPower = true;
} }
public void hideNoPower() { public void hideNoPower() {
noPowerButton.hide(); noPowerButton.hide();
needNoPower = false;
} }
public void enterInterrupt(Color color) { public void enterInterrupt(Color color) {

View File

@@ -198,6 +198,8 @@ public void pressForward() {
if (this instanceof GameView gameView) { if (this instanceof GameView gameView) {
if(gameView.needConfirm) { if(gameView.needConfirm) {
app.getModelSynchronize().confirm(); app.getModelSynchronize().confirm();
} else if(gameView.needNoPower) {
app.getModelSynchronize().confirm();
} else { } else {
app.getAcousticHandler().playSound(MdgaSound.WRONG_INPUT); app.getAcousticHandler().playSound(MdgaSound.WRONG_INPUT);
} }