feat: add basic canvas / improve inspector
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#ifndef LIGHTKEEPER_WINSCREENUI_H
|
||||
#define LIGHTKEEPER_WINSCREENUI_H
|
||||
|
||||
#include <destrum/ObjectModel/Component.h>
|
||||
#include <destrum/ObjectModel/ObjectRef.h>
|
||||
|
||||
// Keeps the screen object active while the goal's WinGoal is reached
|
||||
class WinScreenUI final : public Component {
|
||||
public:
|
||||
explicit WinScreenUI(GameObject& parent);
|
||||
|
||||
std::string GetTypeName() const override { return "WinScreenUI"; }
|
||||
|
||||
void LateUpdate(float dt) override;
|
||||
|
||||
nlohmann::json Serialize() const override;
|
||||
void Deserialize(const nlohmann::json& data) override;
|
||||
void ResolveReferences(const ObjectMap& objects) override;
|
||||
void ImGuiInspector() override;
|
||||
|
||||
void SetGoal(const GameObject& goal) { m_Goal = ObjectRef(goal); }
|
||||
void SetScreen(const GameObject& screen) { m_Screen = ObjectRef(screen); }
|
||||
|
||||
[[nodiscard]] const ObjectRef& GetGoal() const { return m_Goal; }
|
||||
[[nodiscard]] const ObjectRef& GetScreen() const { return m_Screen; }
|
||||
|
||||
private:
|
||||
ObjectRef m_Goal;
|
||||
ObjectRef m_Screen;
|
||||
};
|
||||
|
||||
#endif // LIGHTKEEPER_WINSCREENUI_H
|
||||
Reference in New Issue
Block a user