summaryrefslogtreecommitdiff
path: root/xmake/core/ui/label.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-01-11 00:44:06 +0800
committerruki <[email protected]>2018-01-10 22:24:36 +0800
commit7973898f7c886f981ef3b27ad62fab129e5c5b03 (patch)
treeca2648f40a56553e9876d0e5a732250420bd7185 /xmake/core/ui/label.lua
parent1677f339859edde6e1603dd437a15cc9b2d2e8b0 (diff)
redraw ui window
Diffstat (limited to 'xmake/core/ui/label.lua')
-rw-r--r--xmake/core/ui/label.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/core/ui/label.lua b/xmake/core/ui/label.lua
index aea099e0e..f42260ee1 100644
--- a/xmake/core/ui/label.lua
+++ b/xmake/core/ui/label.lua
@@ -40,7 +40,7 @@ function label:init(name, bounds, text)
self:text_set(text)
-- init text attribute
- self:textattr_set("white")
+ self:textattr_set("black")
end
-- draw view
@@ -69,6 +69,7 @@ end
function label:text_set(text)
self._TEXT = text or ""
self:invalidate()
+ return self
end
-- get text attribute
@@ -78,7 +79,7 @@ end
-- set text attribute, .e.g textattr_set("yellow onblue bold")
function label:textattr_set(attr)
- self:attr_set("textattr", attr)
+ return self:attr_set("textattr", attr)
end
-- get the current text attribute value