Quality of live improvement

This commit is contained in:
Felix Koppe
2024-12-09 16:07:26 +01:00
parent 6a4bdfa455
commit de0f04b5b7
3 changed files with 12 additions and 4 deletions

View File

@@ -18,7 +18,7 @@ public class GameView extends MdgaView {
private GuiHandler guiHandler;
private ButtonLeft leaveButton;
private ButtonRight confirmButton;
public ButtonRight confirmButton;
private ButtonRight noPowerButton;
@@ -28,6 +28,8 @@ public class GameView extends MdgaView {
private FilterPostProcessor fpp;
public boolean needConfirm = false;
private Node guiHandlerNode = new Node();
public GameView(MdgaApp app) {
@@ -116,10 +118,14 @@ public Color getOwnColor() {
public void needConfirm() {
noPowerButton.hide();
confirmButton.show();
needConfirm = true;
}
public void noConfirm() {
confirmButton.hide();
needConfirm = false;
}
public void showNoPower() {

View File

@@ -59,7 +59,6 @@ public void enter() {
public void leave() {
onLeave();
settingsButton.hide();
while (settingsDepth > 0) {
@@ -197,7 +196,11 @@ public void pressForward() {
}
if (this instanceof GameView gameView) {
app.getAcousticHandler().playSound(MdgaSound.WRONG_INPUT);
if(gameView.needConfirm) {
app.getModelSynchronize().confirm();
} else {
app.getAcousticHandler().playSound(MdgaSound.WRONG_INPUT);
}
}
if (this instanceof CeremonyView ceremonyView) {

View File

@@ -38,7 +38,6 @@ public void exit() {
@Override
public void received(SelectPieceMessage msg) {
//TODO
ArrayList<Piece> pieces = msg.getPieces().stream().map(piece -> logic.getGame().getPieceThroughUUID(piece.getUuid())).collect(Collectors.toCollection(ArrayList::new));
parent.getSelectPiece().setPossiblePieces(pieces);
ArrayList<UUID> listPiece = pieces.stream().map(Piece::getUuid).collect(Collectors.toCollection(ArrayList::new));