diff options
Diffstat (limited to 'ui/form/Button.js')
-rw-r--r-- | ui/form/Button.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/form/Button.js b/ui/form/Button.js index 3a35912..46329a6 100644 --- a/ui/form/Button.js +++ b/ui/form/Button.js @@ -38,4 +38,14 @@ module.exports = class Button extends FocusElement { this.emit('pressed') } } + + clicked(button) { + if (button === 'left') { + if (this.isSelected) { + this.emit('pressed') + } else { + this.root.select(this) + } + } + } } |