DialogBox

Utilities View source
DialogBox

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)

Read the DialogBox guide

Types