mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-19 00:06:16 +01:00
lock endTurnButton when player needs to roll dice
This commit is contained in:
parent
9e88353bd5
commit
cb0788e44c
@ -192,6 +192,7 @@ public class Toolbar extends Dialog implements GameEventListener {
|
||||
diceButton.setPreferredSize(new Vector3f(200, 50, 0));
|
||||
diceButton.addClickCommands(s -> ifTopDialog(() -> {
|
||||
diceButton.setEnabled(false);
|
||||
endTurnButton.setEnabled(true);
|
||||
startDiceAnimation();
|
||||
app.getGameLogic().send(new RollDice());
|
||||
app.getGameLogic().playSound(Sound.BUTTON);
|
||||
@ -409,7 +410,7 @@ public class Toolbar extends Dialog implements GameEventListener {
|
||||
diceButton.setEnabled(enabled);
|
||||
tradeButton.setEnabled(enabled);
|
||||
propertyMenuButton.setEnabled(enabled);
|
||||
endTurnButton.setEnabled(enabled);
|
||||
endTurnButton.setEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -333,7 +333,6 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker {
|
||||
@Override
|
||||
public void received(NextPlayerTurn msg) {
|
||||
notifyListeners(new ButtonStatusEvent(true));
|
||||
setState(new ActiveState(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user