summaryrefslogtreecommitdiff
path: root/tests/ui/dialog.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-01-12 22:29:59 +0800
committerruki <[email protected]>2018-01-12 08:59:54 +0800
commitc1ab5da128236923242317a445c8830b50e7451c (patch)
tree33509445dcee4c9373585cbfc859c4446c547b6b /tests/ui/dialog.lua
parent2faa7ee11ebce0e797aa71554d7eac80f0a679d2 (diff)
add text to dialog
Diffstat (limited to 'tests/ui/dialog.lua')
-rw-r--r--tests/ui/dialog.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ui/dialog.lua b/tests/ui/dialog.lua
index bf4f0ca0a..d0e88f801 100644
--- a/tests/ui/dialog.lua
+++ b/tests/ui/dialog.lua
@@ -45,6 +45,9 @@ function demo:init()
-- init main dialog
local dialog_main = dialog: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.]])
dialog_main:button_add("ok", "< OK >", "cm_ok")
dialog_main:button_add("cancel", "< Cancel >", "cm_cancel")
dialog_main:button_add("help", "< Help >", "cm_help")
@@ -54,6 +57,7 @@ function demo:init()
-- 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())
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")
dialog_hello:button_add("no", "< No >", "cm_no")
self:insert(dialog_hello, {centerx = true, centery = true})