summaryrefslogtreecommitdiff
path: root/xmake/core/ui/label.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-01-23 22:19:11 +0800
committerruki <[email protected]>2018-01-23 07:55:11 +0800
commit2db3a5f053faebb08c3e65e5b097d0de4064ac1e (patch)
tree460a7b2fb2d10f510a3bc712f2bd60f89e626abf /xmake/core/ui/label.lua
parentac234fd5eb079d9e21485ac7d4b06c2c30d2db2a (diff)
add action enums to ui
Diffstat (limited to 'xmake/core/ui/label.lua')
-rw-r--r--xmake/core/ui/label.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/xmake/core/ui/label.lua b/xmake/core/ui/label.lua
index 87df818fc..f39358368 100644
--- a/xmake/core/ui/label.lua
+++ b/xmake/core/ui/label.lua
@@ -26,6 +26,7 @@
local log = require("ui/log")
local view = require("ui/view")
local event = require("ui/event")
+local action = require("ui/action")
local curses = require("ui/curses")
-- define module
@@ -69,9 +70,9 @@ end
function label:text_set(text)
text = text or ""
if self._TEXT ~= text then
- local action = self:action("text.changed")
- if action then
- action(self, event.text {text})
+ local on_action = self:action(action.ac_on_text_changed)
+ if on_action then
+ on_action(self, event.text {text})
end
end
self._TEXT = text