52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "Scene/EditorSceneBackend.h"
|
|
#include "State/EditorSession.h"
|
|
|
|
#include <cstdint>
|
|
|
|
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 {
|
|
EditorSceneObjectSnapshot object = {};
|
|
};
|
|
|
|
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
|