Files
OpenVulkano/openVulkanoCpp/Scene/UI/UI.hpp
2021-07-31 01:59:11 +02:00

42 lines
734 B
C++

/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#pragma once
#include "Base/ITickable.hpp"
#include <memory>
#include <vector>
namespace openVulkanoCpp::Scene::UI
{
class UiElement : public ITickable
{
public:
std::vector<std::shared_ptr<UiElement>> children;
virtual ~UiElement() override = default;
virtual void Tick() override {};
virtual void Draw() const;
void Render() const
{
Draw();
for(const auto& child : children)
{
child->Render();
}
}
};
class Ui : public UiElement
{
public:
void Draw() const override {}
};
}