diff options
| author | ruki <[email protected]> | 2018-01-13 00:28:57 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-01-12 20:53:47 +0800 |
| commit | bcb58d536cb131be4358d8893cfd1db77f72d942 (patch) | |
| tree | dc283ebaf56f2f6f8555f0c030275dd17ed9c024 /tests/ui/dialog.lua | |
| parent | 5d8d758fa2fb4a8e9691dae010b97725c6b736c0 (diff) | |
add box dialog
Diffstat (limited to 'tests/ui/dialog.lua')
| -rw-r--r-- | tests/ui/dialog.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/ui/dialog.lua b/tests/ui/dialog.lua index 14552d1cb..dcdb0ff4a 100644 --- a/tests/ui/dialog.lua +++ b/tests/ui/dialog.lua @@ -28,6 +28,7 @@ import("core.ui.rect") import("core.ui.view") import("core.ui.label") import("core.ui.event") +import("core.ui.boxdialog") import("core.ui.textdialog") import("core.ui.application") @@ -44,7 +45,7 @@ function demo:init() self:background_set("blue") -- init main dialog - local dialog_main = textdialog:new("dialog.main", rect {1, 1, self:width() - 1, self:height() - 1}, "main dialog") + local dialog_main = boxdialog:new("dialog.main", rect {1, 1, self:width() - 1, self:height() - 1}, "main dialog") dialog_main:text():text_set([[xmake is a cross-platform build utility based on lua. The project focuses on making development and building easier and provides many features (.e.g package, install, plugin, macro, action, option, task ...), so that any developer can quickly pick it up and enjoy the productivity boost when developing and building project.]]) @@ -56,7 +57,7 @@ The project focuses on making development and building easier and provides many -- init hello dialog local dialog_hello = textdialog:new("dialog.hello", rect {0, 0, self:width() / 2, self:height() / 4}):background_set(dialog_main:frame():background()) - dialog_hello:frame():background_set("green") + dialog_hello:frame():background_set("cyan") dialog_hello:text():text_set("hello xmake! (http://xmake.io)\nA cross-platform build utility based on Lua"):textattr_set("red") dialog_hello:button_add("yes", "< Yes >", "cm_yes") dialog_hello:button_add("no", "< No >", "cm_no") |
