Refactor Editor and SettingsEditor classes to manage context; update keyboard shortcuts display logic

This commit is contained in:
scawful
2025-03-10 11:25:49 -04:00
parent ecac4e5b60
commit 5607ef7702
4 changed files with 20 additions and 11 deletions

View File

@@ -39,7 +39,7 @@ enum class EditorType {
kSettings,
};
constexpr std::array<const char *, 10> kEditorNames = {
constexpr std::array<const char*, 10> kEditorNames = {
"Assembly", "Dungeon", "Graphics", "Music", "Overworld",
"Palette", "Screen", "Sprite", "Message", "Settings",
};
@@ -75,9 +75,11 @@ class Editor {
EditorType type() const { return type_; }
void set_context(EditorContext* context) { context_ = context; }
protected:
EditorType type_;
EditorContext context_;
EditorContext* context_ = nullptr;
};
} // namespace editor