Fix issues with ui rendering
This commit is contained in:
@@ -27,7 +27,8 @@ namespace openVulkanoCpp::Scene::UI
|
||||
Draw();
|
||||
for(const auto& child : children)
|
||||
{
|
||||
child->Render();
|
||||
if (child->ShouldDraw())
|
||||
child->Render();
|
||||
}
|
||||
EndDraw();
|
||||
}
|
||||
@@ -38,6 +39,8 @@ namespace openVulkanoCpp::Scene::UI
|
||||
virtual void Draw() = 0;
|
||||
|
||||
virtual void EndDraw() {};
|
||||
|
||||
virtual bool ShouldDraw() { return true; }
|
||||
};
|
||||
|
||||
class Ui : public UiElement
|
||||
|
||||
Reference in New Issue
Block a user