- Decouple Panel from Core::Layer (P0 issue resolved) - Add EventBus with type-safe event system - Add ISelectionManager interface with SelectionManagerImpl - Add IEditorContext for dependency injection - Update EditorLayer to use new architecture - Update Application to create and inject EditorContext New files: - editor/src/Core/EventBus.h - editor/src/Core/EditorEvents.h - editor/src/Core/ISelectionManager.h - editor/src/Core/SelectionManagerImpl.h - editor/src/Core/IEditorContext.h - editor/src/Core/EditorContextImpl.h This enables future improvements: Undo/Redo, serialization, component extensibility.
53 lines
750 B
C++
53 lines
750 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <vector>
|
|
|
|
namespace XCEngine {
|
|
namespace Editor {
|
|
|
|
using GameObjectID = uint64_t;
|
|
|
|
struct SelectionChangedEvent {
|
|
std::vector<GameObjectID> selectedObjects;
|
|
GameObjectID primarySelection;
|
|
};
|
|
|
|
struct EntityCreatedEvent {
|
|
GameObjectID entityId;
|
|
};
|
|
|
|
struct EntityDeletedEvent {
|
|
GameObjectID entityId;
|
|
};
|
|
|
|
struct EntityChangedEvent {
|
|
GameObjectID entityId;
|
|
};
|
|
|
|
struct EntityParentChangedEvent {
|
|
GameObjectID entityId;
|
|
GameObjectID oldParentId;
|
|
GameObjectID newParentId;
|
|
};
|
|
|
|
struct SceneChangedEvent {
|
|
};
|
|
|
|
struct PlayModeStartedEvent {
|
|
};
|
|
|
|
struct PlayModeStoppedEvent {
|
|
};
|
|
|
|
struct PlayModePausedEvent {
|
|
};
|
|
|
|
struct EditorModeChangedEvent {
|
|
int oldMode;
|
|
int newMode;
|
|
};
|
|
|
|
}
|
|
}
|