#pragma once #include "src/Core/Core.h" #include "src/Core/Maths.h" #include "../EditorSelectionPanel.h" #include namespace Nuake { class Prefab; class Scene; class FrameBuffer; class Texture; class Entity; } class PrefabEditorWindow { public: PrefabEditorWindow(Ref prefab); ~PrefabEditorWindow() { ASSERT(false); }; void Update(float ts); void Draw(); private: Ref prefab; Ref virtualScene; Ref viewportFramebuffer; Ref viewportTexture; bool isViewportFocused; bool isHoveringViewport; bool isRenaming; bool isInitialized = false; Scope SelectionPanel; EditorSelection Selection; Nuake::Entity QueueDeletion; ImGuizmo::OPERATION CurrentOperation = ImGuizmo::TRANSLATE; ImGuizmo::MODE CurrentMode = ImGuizmo::WORLD; bool UseSnapping = true; Nuake::Vector3 CurrentSnapping = Nuake::Vector3{ 0.0f, 0.0f, 0.0f }; bool isControllingCamera = false; private: void DrawViewportWindow(); void DrawOverlay(); void RenderScene(); void DrawEntityTree(Nuake::Entity e); void Save(); };