diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/Dialog.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ui/Dialog.js b/ui/Dialog.js index 26d94d8..f2db43d 100644 --- a/ui/Dialog.js +++ b/ui/Dialog.js @@ -29,6 +29,22 @@ module.exports = class Dialog extends FocusElement { this.h = this.parent.contentH } + open() { + this.opened() + this.visible = true + this.root.select(this) + this.fixLayout() + } + + close() { + this.closed() + this.visible = false + } + + opened() {} + + closed() {} + keyPressed(keyBuf) { if (telc.isCancel(keyBuf)) { this.emit('cancelled') |