From 897fee33b79641ee9670caf0da0ef2587a81768d Mon Sep 17 00:00:00 2001 From: Evgeny Date: Sun, 31 Mar 2024 08:15:15 +0400 Subject: [PATCH] Add complex UI docs and samples #2: add color to the text --- README_RICH_UI.md | 2 +- samples/rich-gui-sample.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README_RICH_UI.md b/README_RICH_UI.md index e144ae8..5a43e8b 100644 --- a/README_RICH_UI.md +++ b/README_RICH_UI.md @@ -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: ``` -{"text", "", {size = 17, gravity = "left"}}, +{"text", "", {size = 17, color = "", gravity = "left"}}, {"button", "", {color = "", gravity = "left"}}, {"icon", "", {size = 17, color = "", gravity = "left"}}, {"progress" "", {progress = 0, color = "", gravity = "left"}}, diff --git a/samples/rich-gui-sample.lua b/samples/rich-gui-sample.lua index e7ee715..b045508 100644 --- a/samples/rich-gui-sample.lua +++ b/samples/rich-gui-sample.lua @@ -5,7 +5,7 @@ function on_resume() if app == nil then return end my_gui = gui{ - {"text", "Title", {size = 19, gravity = "center_h"}}, + {"text", "Title", {size = 19, color = "#ff0000", gravity = "center_h"}}, {"new_line", 2}, {"text", "Hello, World", {size = 21}}, {"spacer", 2},