DialogBox lets you create dialogs more easily and associate its buttons with closures. WARNING: Dialogs cannot be displayed at map init! The DialogBox should be destroyed after it is no longer needed. Example use: let dBox = new DialogBox("Extra starting gold?") dBox.addButton("Yes") -> players[0].addGold(500) destroy dBox dBox.addButton("No", () -> destroy dBox) // Make sure to not call display at map initialization dBox.display(players[0], true)
Hotkey: use ASCII number of the capital letter.
Hotkey: use ASCII number of the capital letter.
Adds a quit button to this dialog. If it is clicked, it ends the game for that player.
Adds a quit button to this dialog. If it is clicked, it ends the game for that player.
Adds a quit button to this dialog. If it is clicked, it ends the game for that player. Hotkey: use ASCII numbers of the capital letter.
Adds a quit button to this dialog. If it is clicked, it ends the game for that player. Hotkey: use ASCII numbers of the capital letter.
Toggles visibility of the DialogBox for a player. Dialogs are invisible by default WARNING: Dialogs cannot be shown at map initialization
Returns the title of the DialogBox.
Changes the title of the DialogBox.