mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
refactor: add GUI instance reference to UI nodes
This commit is contained in:
parent
74a94f869c
commit
4c48afbb90
70 changed files with 1133 additions and 832 deletions
|
|
@ -83,8 +83,8 @@ void LabelCache::update(std::wstring_view text, bool multiline, bool wrap) {
|
|||
}
|
||||
}
|
||||
|
||||
Label::Label(const std::string& text, std::string fontName)
|
||||
: UINode(glm::vec2(text.length() * 8, 16)),
|
||||
Label::Label(GUI& gui, const std::string& text, std::string fontName)
|
||||
: UINode(gui, glm::vec2(text.length() * 8, 16)),
|
||||
text(util::str2wstr_utf8(text)),
|
||||
fontName(std::move(fontName))
|
||||
{
|
||||
|
|
@ -93,8 +93,8 @@ Label::Label(const std::string& text, std::string fontName)
|
|||
}
|
||||
|
||||
|
||||
Label::Label(const std::wstring& text, std::string fontName)
|
||||
: UINode(glm::vec2(text.length() * 8, 16)),
|
||||
Label::Label(GUI& gui, const std::wstring& text, std::string fontName)
|
||||
: UINode(gui, glm::vec2(text.length() * 8, 16)),
|
||||
text(text),
|
||||
fontName(std::move(fontName))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue