diff options
Diffstat (limited to 'tests/ui/hello.lua')
| -rw-r--r-- | tests/ui/hello.lua | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/ui/hello.lua b/tests/ui/hello.lua index 21bcd1b96..a069d015c 100644 --- a/tests/ui/hello.lua +++ b/tests/ui/hello.lua @@ -23,6 +23,9 @@ -- -- imports +import("core.ui.log") +import("core.ui.view") +import("core.ui.event") import("core.ui.application") -- the hello application @@ -35,7 +38,15 @@ function hello:init() application.init(self, "hello") -- init title - self:menubar():title_set("xmake") + self:menubar():title_set("Menu Bar (Hello)") +end + +-- on event +function hello:event_on(e) + view.event_on(self, e) + if e.type == event.ev_keyboard then + self:statusbar():info_set(e.key_name) + end end -- main entry |
