feat: add basic canvas / improve inspector

This commit is contained in:
2026-10-18 20:42:04 +02:00
parent 7df65f52b5
commit ad16daea7c
47 changed files with 3142 additions and 405 deletions
@@ -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