mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
frontend/gui refactor
This commit is contained in:
parent
8c722b146e
commit
1ba563d42a
13 changed files with 207 additions and 148 deletions
|
|
@ -20,6 +20,7 @@ Label::Label(std::string text, std::string fontName)
|
|||
: UINode(vec2(), vec2(text.length() * 8, 15)),
|
||||
text(util::str2wstr_utf8(text)),
|
||||
fontName_(fontName) {
|
||||
setInteractive(false);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -27,6 +28,7 @@ Label::Label(std::wstring text, std::string fontName)
|
|||
: UINode(vec2(), vec2(text.length() * 8, 15)),
|
||||
text(text),
|
||||
fontName_(fontName) {
|
||||
setInteractive(false);
|
||||
}
|
||||
|
||||
void Label::setText(std::wstring text) {
|
||||
|
|
@ -314,7 +316,7 @@ void TextBox::text(std::wstring value) {
|
|||
InputBindBox::InputBindBox(Binding& binding, vec4 padding)
|
||||
: Panel(vec2(100,32), padding, 0, false),
|
||||
binding(binding) {
|
||||
label = new Label(L"");
|
||||
label = std::make_shared<Label>(L"");
|
||||
add(label);
|
||||
scrollable(false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue