Translate color option to create() function call

Forgot that in PR #646
This commit is contained in:
jfrickmann
2021-08-28 10:29:41 -04:00
parent 1af65969ed
commit 5b3db33f03
+5 -1
View File
@@ -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) {