mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
minor refactor
This commit is contained in:
parent
d2b4e096ae
commit
cefa26b497
2 changed files with 4 additions and 4 deletions
|
|
@ -287,7 +287,7 @@ static std::wstring parse_inner_text(
|
|||
) {
|
||||
std::wstring text = L"";
|
||||
if (element.size() == 1) {
|
||||
std::string source = element.sub(0).attr("#").getText();
|
||||
std::string source = element.sub(0).getInnerText();
|
||||
util::trim(source);
|
||||
text = util::str2wstr_utf8(source);
|
||||
if (text[0] == '@') {
|
||||
|
|
@ -387,7 +387,7 @@ static std::shared_ptr<UINode> read_button(
|
|||
|
||||
std::shared_ptr<Button> button;
|
||||
auto& elements = element.getElements();
|
||||
if (!elements.empty() && elements[0]->getTag() != "#") {
|
||||
if (!elements.empty() && elements[0]->isText()) {
|
||||
auto inner = reader.readUINode(*elements.at(0));
|
||||
if (inner != nullptr) {
|
||||
button = std::make_shared<Button>(gui, inner, padding);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue