Cosmetcis + add colorchoice
This commit is contained in:
@@ -34,6 +34,7 @@ WidgetSettings::WidgetSettings(Window * parent, Widget * widget, std::function<v
|
|||||||
{
|
{
|
||||||
auto form = &content->form;
|
auto form = &content->form;
|
||||||
FormGridLayout grid(content->form.width());
|
FormGridLayout grid(content->form.width());
|
||||||
|
grid.setLabelWidth(width() / 5);
|
||||||
form->clear();
|
form->clear();
|
||||||
|
|
||||||
uint8_t optIdx = 0;
|
uint8_t optIdx = 0;
|
||||||
@@ -119,6 +120,12 @@ WidgetSettings::WidgetSettings(Window * parent, Widget * widget, std::function<v
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ZoneOption::Color:
|
case ZoneOption::Color:
|
||||||
|
new ColorEdit(form, grid.getFieldSlot(), [=]() -> int { // getValue
|
||||||
|
return (int) widget->getOptionValue(optIdx)->unsignedValue;
|
||||||
|
},
|
||||||
|
[=](int newValue) { // setValue
|
||||||
|
widget->setOptionValue(optIdx, OPTION_VALUE_UNSIGNED((uint32_t) newValue));
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user