adding and integrating ImGuizmo
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user