| 75 | } |
| 76 | |
| 77 | void ImguiLayer::AddUIComponent(const Ref<Components::UI::UIComponent>& component) { |
| 78 | m_ui_components.push_back(component); |
| 79 | |
| 80 | if (!component->HasParentLayer()) { |
| 81 | auto last = std::prev(std::end(m_ui_components)); |
| 82 | (*last)->SetParentLayer(shared_from_this()); |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | void ImguiLayer::AddUIComponent(Ref<Components::UI::UIComponent>&& component) { |
| 87 | if (!component->HasParentLayer()) { |
no test coverage detected