summaryrefslogtreecommitdiff
path: root/xmake/core/ui/button.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-01-23 22:35:03 +0800
committerruki <[email protected]>2018-01-23 09:30:22 +0800
commit98f8f5d64a469fd727831a24776a7a69358f5768 (patch)
tree37f6ed26087a2a43f77b12bb300492124cff959c /xmake/core/ui/button.lua
parentf7c0c7b89a45bf02a3ca3ffee8251d7a09654e41 (diff)
add on_action to view
Diffstat (limited to 'xmake/core/ui/button.lua')
-rw-r--r--xmake/core/ui/button.lua11
1 files changed, 1 insertions, 10 deletions
diff --git a/xmake/core/ui/button.lua b/xmake/core/ui/button.lua
index 763dae995..14fa2a8f5 100644
--- a/xmake/core/ui/button.lua
+++ b/xmake/core/ui/button.lua
@@ -87,16 +87,7 @@ function button:event_on(e)
-- enter this button?
if e.type == event.ev_keyboard then
if e.key_name == "Enter" then
- local on_action = self:action(action.ac_on_enter)
- if on_action then
- if type(on_action) == "string" then
- -- send command
- self:application():send(on_action)
- elseif type(on_action) == "function" then
- -- do action script
- on_action(self)
- end
- end
+ self:action_on(action.ac_on_enter)
return true
end
end