Add complex UI docs and samples #2: add color to the text
This commit is contained in:
@@ -72,7 +72,7 @@ Handling clicks on elements works the same as when using the `ui` module API. Ju
|
|||||||
This is all you need to know about the new API. Below is an example demonstrating all supported elements and all their default parameters:
|
This is all you need to know about the new API. Below is an example demonstrating all supported elements and all their default parameters:
|
||||||
|
|
||||||
```
|
```
|
||||||
{"text", "", {size = 17, gravity = "left"}},
|
{"text", "", {size = 17, color = "", gravity = "left"}},
|
||||||
{"button", "", {color = "", gravity = "left"}},
|
{"button", "", {color = "", gravity = "left"}},
|
||||||
{"icon", "", {size = 17, color = "", gravity = "left"}},
|
{"icon", "", {size = 17, color = "", gravity = "left"}},
|
||||||
{"progress" "", {progress = 0, color = "", gravity = "left"}},
|
{"progress" "", {progress = 0, color = "", gravity = "left"}},
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ function on_resume()
|
|||||||
if app == nil then return end
|
if app == nil then return end
|
||||||
|
|
||||||
my_gui = gui{
|
my_gui = gui{
|
||||||
{"text", "<b>Title</b>", {size = 19, gravity = "center_h"}},
|
{"text", "<b>Title</b>", {size = 19, color = "#ff0000", gravity = "center_h"}},
|
||||||
{"new_line", 2},
|
{"new_line", 2},
|
||||||
{"text", "Hello, World", {size = 21}},
|
{"text", "Hello, World", {size = 21}},
|
||||||
{"spacer", 2},
|
{"spacer", 2},
|
||||||
|
|||||||
Reference in New Issue
Block a user