diff options
| author | ruki <[email protected]> | 2018-01-23 22:19:11 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-01-23 07:55:11 +0800 |
| commit | 2db3a5f053faebb08c3e65e5b097d0de4064ac1e (patch) | |
| tree | 460a7b2fb2d10f510a3bc712f2bd60f89e626abf /xmake/core/ui/dialog.lua | |
| parent | ac234fd5eb079d9e21485ac7d4b06c2c30d2db2a (diff) | |
add action enums to ui
Diffstat (limited to 'xmake/core/ui/dialog.lua')
| -rw-r--r-- | xmake/core/ui/dialog.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xmake/core/ui/dialog.lua b/xmake/core/ui/dialog.lua index 440f9219a..fdd692f6d 100644 --- a/xmake/core/ui/dialog.lua +++ b/xmake/core/ui/dialog.lua @@ -28,6 +28,7 @@ local rect = require("ui/rect") local event = require("ui/event") local label = require("ui/label") local panel = require("ui/panel") +local action = require("ui/action") local button = require("ui/button") local window = require("ui/window") local curses = require("ui/curses") @@ -99,9 +100,9 @@ end function dialog:quit() local parent = self:parent() if parent then - local action = self:action("command.exit") - if action then - action(self, event.command {"cm_exit"}) + local on_action = self:action(action.ac_on_exit) + if on_action then + on_action(self, event.command {"cm_exit"}) end parent:remove(self) end |
