diff options
| author | ruki <[email protected]> | 2017-12-27 21:03:29 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-12-27 00:20:57 +0800 |
| commit | 663308b956fb9cedbd002e980d716818f0b5e7b2 (patch) | |
| tree | bc0e3aee5a547db50ff61d3a7cb793d2f7f36714 /tests/ui/hello.lua | |
| parent | 603f29d146a735671c90d7430e7e5a200b749f74 (diff) | |
improve menubar and statusbar
Diffstat (limited to 'tests/ui/hello.lua')
| -rw-r--r-- | tests/ui/hello.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/hello.lua b/tests/ui/hello.lua index f52d71230..776cee75a 100644 --- a/tests/ui/hello.lua +++ b/tests/ui/hello.lua @@ -40,7 +40,7 @@ function hello:init() application.init(self, "hello") -- init title - self:menubar():title_set("Menu Bar (Hello)") + self:menubar():title():text_set("Menu Bar (Hello)") -- add title label self:desktop():insert(label:new("title", rect {0, 0, 12, 1}, "hello xmake!"), {centerx = true}) @@ -50,7 +50,7 @@ end function hello:event_on(e) view.event_on(self, e) if e.type == event.ev_keyboard then - self:statusbar():info_set(e.key_name) + self:statusbar():info():text_set(e.key_name) if e.key_name == "s" then self:statusbar():show(not self:statusbar():state("visible")) elseif e.key_name == "m" then |
