adding and integrating ImGuizmo

This commit is contained in:
2026-10-02 11:36:33 -07:00
parent 379589fe8c
commit 6e48b0605c
28 changed files with 1223 additions and 108 deletions
+8 -3
View File
@@ -8,14 +8,16 @@
#include <utility>
#include <vector>
#include "../editor_context.hpp"
class InspectorPanel : public sophia::Panel {
public:
// Stand-in for an asset browser: the textures a sprite can pick from.
using TextureList =
std::vector<std::pair<std::string, sophia::TextureHandle>>;
InspectorPanel(sophia::Entity& selected, const TextureList& textures)
: Panel{{.name = "Inspector"}}, selected{selected}, textures{textures} {}
InspectorPanel(EditorContext& context, const TextureList& textures)
: Panel{{.name = "Inspector"}}, context{context}, textures{textures} {}
void onUpdate(const sophia::FrameInfo& frameInfo) override;
@@ -24,8 +26,11 @@ class InspectorPanel : public sophia::Panel {
void drawTransform();
void drawCamera();
void drawSprite();
void drawMesh();
void drawAddComponent();
sophia::Entity& selected;
EditorContext& context;
// The selected entity, for the duration of onUpdate().
sophia::Entity selected;
const TextureList& textures;
};