| 57 | } |
| 58 | |
| 59 | VectorWidgetPtr LayoutManager::loadLayout(std::string_view _file, std::string_view _prefix, Widget* _parent) |
| 60 | { |
| 61 | mCurrentLayoutName = _file; |
| 62 | |
| 63 | ResourceLayout* resource = getByName(_file, false); |
| 64 | if (!resource) |
| 65 | { |
| 66 | ResourceManager::getInstance().load(mCurrentLayoutName); |
| 67 | resource = getByName(_file, false); |
| 68 | } |
| 69 | |
| 70 | VectorWidgetPtr result; |
| 71 | if (resource) |
| 72 | result = resource->createLayout(_prefix, _parent); |
| 73 | else |
| 74 | MYGUI_LOG(Warning, "Layout '" << _file << "' couldn't be loaded"); |
| 75 | |
| 76 | mCurrentLayoutName.clear(); |
| 77 | |
| 78 | return result; |
| 79 | } |
| 80 | |
| 81 | void LayoutManager::unloadLayout(VectorWidgetPtr& _widgets) |
| 82 | { |
no test coverage detected