Added new choose dialog (creature types and etc):

* added incremental search;
 * added keyboard hotkeys (up/down for select, enter for choose);
 * added choose by mouse double click;
 * added source card name;
 * fixed cancel button on required choice (#4230);
 * fixed text sizes form messages (now it's auto size);
This commit is contained in:
Oleg Agafonov 2017-12-25 08:12:02 +04:00
parent 1efb51a22c
commit 749ca59ad6
7 changed files with 597 additions and 247 deletions

View file

@ -1220,14 +1220,17 @@ public final class GamePanel extends javax.swing.JPanel {
public void getChoice(Choice choice, UUID objectId) {
hideAll();
// TODO: remember last choices and search incremental for same events?
PickChoiceDialog pickChoice = new PickChoiceDialog();
pickChoice.showDialog(choice, objectId, choiceWindowState);
if (choice.isKeyChoice()) {
SessionHandler.sendPlayerString(gameId, choice.getChoiceKey());
/* // old code, auto complete was for auto scripting?
if (pickChoice.isAutoSelect()) {
SessionHandler.sendPlayerString(gameId, '#' + choice.getChoiceKey());
} else {
SessionHandler.sendPlayerString(gameId, choice.getChoiceKey());
}
}*/
} else {
SessionHandler.sendPlayerString(gameId, choice.getChoice());
}