Add Rom dependency injection to OverworldEditor
This commit is contained in:
@@ -48,12 +48,11 @@ bool IsEditorActive(Editor *editor, std::vector<Editor *> &active_editors) {
|
||||
|
||||
} // namespace
|
||||
|
||||
void EditorManager::SetupScreen(std::string filename) {
|
||||
void EditorManager::Initialize(std::string filename) {
|
||||
if (!filename.empty()) {
|
||||
PRINT_IF_ERROR(rom()->LoadFromFile(filename));
|
||||
}
|
||||
overworld_editor_.InitializeZeml();
|
||||
InitializeCommands();
|
||||
overworld_editor_.Initialize();
|
||||
}
|
||||
|
||||
absl::Status EditorManager::Update() {
|
||||
@@ -298,11 +297,6 @@ void EditorManager::ManageKeyboardShortcuts() {
|
||||
}
|
||||
}
|
||||
|
||||
void EditorManager::InitializeCommands() {
|
||||
editor_context_.command_manager.RegisterPrefix("window", 'w',
|
||||
"window management", "");
|
||||
}
|
||||
|
||||
void EditorManager::DrawStatusPopup() {
|
||||
static absl::Status prev_status;
|
||||
if (!status_.ok()) {
|
||||
|
||||
Reference in New Issue
Block a user