Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- size_t properties_cnt = properties->get_child_count() - 1;
- size_t count = std::max(properties_cnt, info.size());
- for (int i = 1; i < count + 1; ++i) {
- if (i >= properties->get_child_count()) {
- add_root_property();
- }
- if (auto prop = Object::cast_to<ResourceSchemaNode>(properties->get_child(i))) {
- // if (auto iter = info.find(prop->get_field_name()); iter != info.end()) {
- // prop->update_with(iter->second);
- // }
- } else {
- ERR_PRINT("Properties box contains unexpected nodes that aren't of type ResourceSchemaNode");
- }
- }
- // Free the extra UI properties that we don't need.
- for (int i = 1 + info.size(); i < properties->get_child_count(); ++i) {
- properties->get_child(i)->free();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement