From 5b3db33f03a2a8dc96142905e9e3f9ff7895788a Mon Sep 17 00:00:00 2001 From: jfrickmann Date: Sat, 28 Aug 2021 10:29:41 -0400 Subject: [PATCH] Translate color option to create() function call Forgot that in PR #646 --- radio/src/lua/widgets.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/radio/src/lua/widgets.cpp b/radio/src/lua/widgets.cpp index f40ee50ed..47ca9d325 100644 --- a/radio/src/lua/widgets.cpp +++ b/radio/src/lua/widgets.cpp @@ -358,7 +358,11 @@ class LuaWidgetFactory: public WidgetFactory lua_newtable(lsWidgets); int i = 0; for (const ZoneOption * option = options; option->name; option++, i++) { - l_pushtableint(option->name, persistentData->options[i].value.signedValue); + int32_t value = persistentData->options[i].value.signedValue; + if (option->type == ZoneOption::Color) + l_pushtableint(option->name, COLOR2FLAGS(value) | RGB_FLAG); + else + l_pushtableint(option->name, value); } if (lua_pcall(lsWidgets, 2, 1, 0) != 0) {