gui: improved multi amount dialog (added cancel option, added mana symbols support in messages, improved form structure)

This commit is contained in:
Oleg Agafonov 2023-11-02 12:30:40 +04:00
parent 00fcdc4653
commit 81d44e615f
6 changed files with 211 additions and 120 deletions

View file

@ -1785,7 +1785,11 @@ public final class GamePanel extends javax.swing.JPanel {
DialogManager.getManager(gameId).fadeOut();
pickMultiNumber.showDialog(messages, min, max, lastGameData.options);
SessionHandler.sendPlayerString(gameId, pickMultiNumber.getMultiAmount());
if (pickMultiNumber.isCancel()) {
SessionHandler.sendPlayerBoolean(gameId, false);
} else {
SessionHandler.sendPlayerString(gameId, pickMultiNumber.getMultiAmount());
}
}
public void getChoice(int messageId, GameView gameView, Map<String, Serializable> options, Choice choice, UUID objectId) {