diff --git a/SHADE_Engine/src/Editor/Gizmos/SHTransformGizmo.cpp b/SHADE_Engine/src/Editor/Gizmos/SHTransformGizmo.cpp new file mode 100644 index 00000000..a9276b6d --- /dev/null +++ b/SHADE_Engine/src/Editor/Gizmos/SHTransformGizmo.cpp @@ -0,0 +1,24 @@ +#include "SHpch.h" +#include "SHTransformGizmo.h" + +#include "ECS_Base/Managers/SHComponentManager.h" +#include "ECS_Base/Managers/SHSystemManager.h" +#include "Editor/SHEditor.hpp" + +namespace SHADE +{ + void SHTransformGizmo::Draw() + { + if(selectedEntityTranformComponent == nullptr) + { + SHEditor* editor = SHSystemManager::GetSystem(); + if(editor->selectedEntities.empty()) + return; + EntityID eid = editor->selectedEntities.back(); + selectedEntityTranformComponent = SHComponentManager::GetComponent_s(eid); + } + + + + } +} diff --git a/SHADE_Engine/src/Editor/Gizmos/SHTransformGizmo.h b/SHADE_Engine/src/Editor/Gizmos/SHTransformGizmo.h new file mode 100644 index 00000000..d034eef9 --- /dev/null +++ b/SHADE_Engine/src/Editor/Gizmos/SHTransformGizmo.h @@ -0,0 +1,13 @@ +#pragma once +#include "Math/Transform/SHTransformComponent.h" + +namespace SHADE +{ + class SHTransformGizmo + { + public: + void Draw(); + private: + SHTransformComponent* selectedEntityTranformComponent{nullptr}; + }; +}