diff options
| author | ruki <[email protected]> | 2018-01-20 00:30:22 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-01-19 21:02:13 +0800 |
| commit | 35ca390ac845a86c78e34059946207f8f980ed5e (patch) | |
| tree | 3f3e8be89b13ab60539958bfd5e62dd38692aecb | |
| parent | 2e300a17250c2e391cd36d5743b806877982eaf2 (diff) | |
modify dialog test
| -rw-r--r-- | tests/ui/dialog.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/ui/dialog.lua b/tests/ui/dialog.lua index 827ca1385..b42da5875 100644 --- a/tests/ui/dialog.lua +++ b/tests/ui/dialog.lua @@ -59,14 +59,6 @@ function demo:init() dialog_main:button_add("quit", "< Quit >", "cm_quit") self:insert(dialog_main) - -- init tips dialog - local dialog_tips = textdialog:new("dialog.tips", rect {0, 0, 50, 8}):background_set(dialog_main:frame():background()) - dialog_tips:frame():background_set("cyan") - dialog_tips:text():text_set("hello xmake! (http://xmake.io)\nA cross-platform build utility based on Lua"):textattr_set("red") - dialog_tips:button_add("yes", "< Yes >", function (v, e) dialog_tips:show(false) end) - dialog_tips:button_add("no", "< No >", function (v, e) dialog_tips:show(false) end) - self:insert(dialog_tips, {centerx = true, centery = true}) - -- init input dialog local dialog_input = inputdialog:new("dialog.input", rect {0, 0, 50, 8}):background_set(dialog_main:frame():background()) dialog_input:frame():background_set("cyan") @@ -78,6 +70,14 @@ function demo:init() end) self:insert(dialog_input, {centerx = true, centery = true}) dialog_input:show(false) + + -- init tips dialog + local dialog_tips = textdialog:new("dialog.tips", rect {0, 0, 50, 8}):background_set(dialog_main:frame():background()) + dialog_tips:frame():background_set("cyan") + dialog_tips:text():text_set("hello xmake! (http://xmake.io)\nA cross-platform build utility based on Lua"):textattr_set("red") + dialog_tips:button_add("yes", "< Yes >", function (v, e) dialog_tips:show(false) end) + dialog_tips:button_add("no", "< No >", function (v, e) dialog_tips:show(false) end) + self:insert(dialog_tips, {centerx = true, centery = true}) end -- main entry |
