diff options
Diffstat (limited to 'tests/ui/hello.lua')
| -rw-r--r-- | tests/ui/hello.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/hello.lua b/tests/ui/hello.lua index 776cee75a..490bf46de 100644 --- a/tests/ui/hello.lua +++ b/tests/ui/hello.lua @@ -28,6 +28,7 @@ import("core.ui.rect") import("core.ui.view") import("core.ui.label") import("core.ui.event") +import("core.ui.button") import("core.ui.application") -- the hello application @@ -44,6 +45,12 @@ function hello:init() -- add title label self:desktop():insert(label:new("title", rect {0, 0, 12, 1}, "hello xmake!"), {centerx = true}) + + -- add yes button + self:desktop():insert(button:new("yes", rect {0, 1, 7, 2}, "< Yes >"), {centerx = true}) + + -- add no button + self:desktop():insert(button:new("no", rect {0, 2, 6, 3}, "< No >"), {centerx = true}) end -- on event |
