24 virtual void Tick(
double deltaTime) {}
25 virtual void Render() {}
31 m_childWidgets.push_back(std::make_unique<T>(
this));
32 Widget* widget = m_childWidgets.back().get();
35 return dynamic_cast<T*
>(widget);
38 bool HasStarted() {
return m_hasStarted; }
43 MulticastDelegate<Widget*> m_OnDestroy;
46 void RenderChildren();
49 class App* GetApp()
const;
50 Widget* GetParentWidget()
const;
55 Widget* m_parentWidget =
nullptr;
56 bool m_hasStarted =
false;
58 std::vector<std::unique_ptr<Widget>> m_childWidgets;
62 bool m_wantsDestroy =
false;