package DialogBox import HashMap import Dialog import LinkedList public interface DialogBoxButtonClosure function run() /** 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) */ public class DialogBox private static constant buttonClosures = new HashMap private constant buttons = new LinkedList