mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-14 15:31:49 +00:00
peak of refactor
This commit is contained in:
parent
e5fb9a9a23
commit
96b177858e
1 changed files with 2 additions and 2 deletions
|
|
@ -50,7 +50,7 @@ void UiDocument::collect(uinodes_map& map, std::shared_ptr<gui::UINode> node) {
|
||||||
if (!id.empty()) {
|
if (!id.empty()) {
|
||||||
map[id] = node;
|
map[id] = node;
|
||||||
}
|
}
|
||||||
auto container = dynamic_cast<gui::Container*>(node.get());
|
auto container = std::dynamic_pointer_cast<gui::Container>(node);
|
||||||
if (container) {
|
if (container) {
|
||||||
for (auto subnode : container->getNodes()) {
|
for (auto subnode : container->getNodes()) {
|
||||||
collect(map, subnode);
|
collect(map, subnode);
|
||||||
|
|
@ -83,4 +83,4 @@ std::unique_ptr<UiDocument> UiDocument::read(int penv, std::string namesp, fs::p
|
||||||
std::shared_ptr<gui::UINode> UiDocument::readElement(fs::path file) {
|
std::shared_ptr<gui::UINode> UiDocument::readElement(fs::path file) {
|
||||||
auto document = read(-1, file.filename().u8string(), file);
|
auto document = read(-1, file.filename().u8string(), file);
|
||||||
return document->getRoot();
|
return document->getRoot();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue