Refactor EditorContext and system managers for improved clarity and consistency
This commit is contained in:
@@ -20,11 +20,11 @@ namespace app {
|
|||||||
namespace editor {
|
namespace editor {
|
||||||
|
|
||||||
struct EditorContext {
|
struct EditorContext {
|
||||||
static ConstantManager constant_manager;
|
ConstantManager constant_manager;
|
||||||
static CommandManager command_manager;
|
CommandManager command_manager;
|
||||||
static ExtensionManager extension_manager;
|
ExtensionManager extension_manager;
|
||||||
static HistoryManager history_manager;
|
HistoryManager history_manager;
|
||||||
static ResourceManager resource_manager;
|
ResourceManager resource_manager;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class EditorType {
|
enum class EditorType {
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ ImGuiKey MapKeyToImGuiKey(char key);
|
|||||||
|
|
||||||
class CommandManager {
|
class CommandManager {
|
||||||
public:
|
public:
|
||||||
|
CommandManager() = default;
|
||||||
|
~CommandManager() = default;
|
||||||
|
|
||||||
using Command = std::function<void()>;
|
using Command = std::function<void()>;
|
||||||
|
|
||||||
struct CommandInfo {
|
struct CommandInfo {
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ namespace editor {
|
|||||||
// System resource manager.
|
// System resource manager.
|
||||||
class ResourceManager {
|
class ResourceManager {
|
||||||
public:
|
public:
|
||||||
ResourceManager();
|
ResourceManager() : count_(0) {}
|
||||||
~ResourceManager();
|
~ResourceManager() = default;
|
||||||
|
|
||||||
void Load(const char* path);
|
void Load(const char* path);
|
||||||
void Unload(const char* path);
|
void Unload(const char* path);
|
||||||
|
|||||||
Reference in New Issue
Block a user