diff --git a/src/app/script/dialog_class.cpp b/src/app/script/dialog_class.cpp index d94aa5d1a..ecaadf372 100644 --- a/src/app/script/dialog_class.cpp +++ b/src/app/script/dialog_class.cpp @@ -117,6 +117,12 @@ struct Dialog { it->second->setVisible(visible); } + void setLabelText(const char* id, const char* text) { + auto it = labelWidgets.find(id); + if (it != labelWidgets.end()) + it->second->setText(text); + } + }; templatesetLabelText(id, s); + relayout = true; + } + lua_pop(L, 1); + + type = lua_getfield(L, 2, "focus"); + if (type != LUA_TNIL && lua_toboolean(L, -1)) { + widget->requestFocus(); + relayout = true; + } + lua_pop(L, 1); + + // TODO slider value? combobox option(s)? color? colors (shade)?) + if (relayout) { dlg->window.layout();