Quality of live improvement
This commit is contained in:
		@@ -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() {
 | 
			
		||||
 
 | 
			
		||||
@@ -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) {
 | 
			
		||||
 
 | 
			
		||||
@@ -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));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user