TextBox new properties
This commit is contained in:
@@ -228,6 +228,20 @@ static std::shared_ptr<UINode> readTextBox(UiXmlReader& reader, xml::xmlelement
|
||||
);
|
||||
textbox->setTextSupplier(supplier);
|
||||
}
|
||||
if (element->has("focused-color")) {
|
||||
textbox->setFocusedColor(element->attr("focused-color").asColor());
|
||||
}
|
||||
if (element->has("error-color")) {
|
||||
textbox->setErrorColor(element->attr("error-color").asColor());
|
||||
}
|
||||
if (element->has("validator")) {
|
||||
auto validator = scripting::create_wstring_validator(
|
||||
reader.getEnvironment().getId(),
|
||||
element->attr("validator").getText(),
|
||||
reader.getFilename()+".lua"
|
||||
);
|
||||
textbox->setTextValidator(validator);
|
||||
}
|
||||
return textbox;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user