60 lines
1.3 KiB
C++
60 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include "State/EditorSession.h"
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
namespace XCEngine::Components {
|
|
|
|
class GameObject;
|
|
|
|
} // namespace XCEngine::Components
|
|
|
|
namespace XCEngine::UI::Editor::App {
|
|
|
|
class EditorSceneRuntime;
|
|
|
|
enum class InspectorSelectionSource : std::uint8_t {
|
|
None = 0,
|
|
Project,
|
|
Scene
|
|
};
|
|
|
|
enum class InspectorSubjectKind : std::uint8_t {
|
|
None = 0,
|
|
ProjectAsset,
|
|
SceneObject
|
|
};
|
|
|
|
struct InspectorProjectAssetSubject {
|
|
EditorSelectionState selection = {};
|
|
};
|
|
|
|
struct InspectorSceneObjectSubject {
|
|
const ::XCEngine::Components::GameObject* gameObject = nullptr;
|
|
std::string itemId = {};
|
|
std::string displayName = {};
|
|
};
|
|
|
|
struct InspectorSubject {
|
|
InspectorSubjectKind kind = InspectorSubjectKind::None;
|
|
InspectorSelectionSource source = InspectorSelectionSource::None;
|
|
InspectorProjectAssetSubject projectAsset = {};
|
|
InspectorSceneObjectSubject sceneObject = {};
|
|
|
|
constexpr bool HasSelection() const {
|
|
return kind != InspectorSubjectKind::None;
|
|
}
|
|
};
|
|
|
|
InspectorSelectionSource ResolveInspectorSelectionSource(
|
|
const EditorSession& session,
|
|
const EditorSceneRuntime& sceneRuntime);
|
|
|
|
InspectorSubject BuildInspectorSubject(
|
|
const EditorSession& session,
|
|
const EditorSceneRuntime& sceneRuntime);
|
|
|
|
} // namespace XCEngine::UI::Editor::App
|