diff options
| author | ruki <[email protected]> | 2018-01-12 22:38:33 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-01-12 09:51:23 +0800 |
| commit | 5d8d758fa2fb4a8e9691dae010b97725c6b736c0 (patch) | |
| tree | f35203ae41c4fd6fac4ac82e7c1c142480f749a9 /tests/ui/dialog.lua | |
| parent | 31f736c3440041b3ac060cd4519807d82a4d0e19 (diff) | |
add text dialog
Diffstat (limited to 'tests/ui/dialog.lua')
| -rw-r--r-- | tests/ui/dialog.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/dialog.lua b/tests/ui/dialog.lua index d0e88f801..14552d1cb 100644 --- a/tests/ui/dialog.lua +++ b/tests/ui/dialog.lua @@ -28,7 +28,7 @@ import("core.ui.rect") import("core.ui.view") import("core.ui.label") import("core.ui.event") -import("core.ui.dialog") +import("core.ui.textdialog") import("core.ui.application") -- the demo application @@ -44,7 +44,7 @@ function demo:init() self:background_set("blue") -- init main dialog - local dialog_main = dialog:new("dialog.main", rect {1, 1, self:width() - 1, self:height() - 1}, "main dialog") + local dialog_main = textdialog: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.]]) @@ -55,7 +55,7 @@ The project focuses on making development and building easier and provides many self:insert(dialog_main) -- init hello dialog - local dialog_hello = dialog:new("dialog.hello", rect {0, 0, self:width() / 2, self:height() / 4}):background_set(dialog_main:frame():background()) + 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: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") |
