Quality of live improvement
This commit is contained in:
@@ -18,7 +18,7 @@ public class GameView extends MdgaView {
|
|||||||
private GuiHandler guiHandler;
|
private GuiHandler guiHandler;
|
||||||
|
|
||||||
private ButtonLeft leaveButton;
|
private ButtonLeft leaveButton;
|
||||||
private ButtonRight confirmButton;
|
public ButtonRight confirmButton;
|
||||||
|
|
||||||
private ButtonRight noPowerButton;
|
private ButtonRight noPowerButton;
|
||||||
|
|
||||||
@@ -28,6 +28,8 @@ public class GameView extends MdgaView {
|
|||||||
|
|
||||||
private FilterPostProcessor fpp;
|
private FilterPostProcessor fpp;
|
||||||
|
|
||||||
|
public boolean needConfirm = false;
|
||||||
|
|
||||||
private Node guiHandlerNode = new Node();
|
private Node guiHandlerNode = new Node();
|
||||||
|
|
||||||
public GameView(MdgaApp app) {
|
public GameView(MdgaApp app) {
|
||||||
@@ -116,10 +118,14 @@ public Color getOwnColor() {
|
|||||||
public void needConfirm() {
|
public void needConfirm() {
|
||||||
noPowerButton.hide();
|
noPowerButton.hide();
|
||||||
confirmButton.show();
|
confirmButton.show();
|
||||||
|
|
||||||
|
needConfirm = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void noConfirm() {
|
public void noConfirm() {
|
||||||
confirmButton.hide();
|
confirmButton.hide();
|
||||||
|
|
||||||
|
needConfirm = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showNoPower() {
|
public void showNoPower() {
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ public void enter() {
|
|||||||
public void leave() {
|
public void leave() {
|
||||||
onLeave();
|
onLeave();
|
||||||
|
|
||||||
|
|
||||||
settingsButton.hide();
|
settingsButton.hide();
|
||||||
|
|
||||||
while (settingsDepth > 0) {
|
while (settingsDepth > 0) {
|
||||||
@@ -197,7 +196,11 @@ public void pressForward() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this instanceof GameView gameView) {
|
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) {
|
if (this instanceof CeremonyView ceremonyView) {
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ public void exit() {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void received(SelectPieceMessage msg) {
|
public void received(SelectPieceMessage msg) {
|
||||||
//TODO
|
|
||||||
ArrayList<Piece> pieces = msg.getPieces().stream().map(piece -> logic.getGame().getPieceThroughUUID(piece.getUuid())).collect(Collectors.toCollection(ArrayList::new));
|
ArrayList<Piece> pieces = msg.getPieces().stream().map(piece -> logic.getGame().getPieceThroughUUID(piece.getUuid())).collect(Collectors.toCollection(ArrayList::new));
|
||||||
parent.getSelectPiece().setPossiblePieces(pieces);
|
parent.getSelectPiece().setPossiblePieces(pieces);
|
||||||
ArrayList<UUID> listPiece = pieces.stream().map(Piece::getUuid).collect(Collectors.toCollection(ArrayList::new));
|
ArrayList<UUID> listPiece = pieces.stream().map(Piece::getUuid).collect(Collectors.toCollection(ArrayList::new));
|
||||||
|
|||||||
Reference in New Issue
Block a user