mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
feat: translated textbox hints support
This commit is contained in:
parent
5bdf8f8065
commit
32af745eb9
1 changed files with 5 additions and 0 deletions
|
|
@ -434,6 +434,11 @@ static std::shared_ptr<UINode> read_text_box(
|
|||
auto placeholder =
|
||||
util::str2wstr_utf8(element.attr("placeholder", "").getText());
|
||||
auto hint = util::str2wstr_utf8(element.attr("hint", "").getText());
|
||||
if (!hint.empty() && hint[0] == '@') {
|
||||
hint = langs::get(
|
||||
hint.substr(1), util::str2wstr_utf8(reader.getContext())
|
||||
);
|
||||
}
|
||||
auto text = parse_inner_text(element, reader.getContext());
|
||||
auto textbox = std::make_shared<TextBox>(
|
||||
reader.getGUI(), placeholder, glm::vec4(0.0f)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue