Refactor loading methods in EditorManager and OverworldEditor for improved clarity and consistency; add checks for loaded ROM in GfxGroupEditor and MessageEditor

This commit is contained in:
scawful
2025-03-12 14:28:53 -04:00
parent 4bb087f2c5
commit 806885824a
4 changed files with 18 additions and 7 deletions

View File

@@ -85,9 +85,7 @@ void MessageEditor::Initialize() {
DrawMessagePreview();
}
absl::Status MessageEditor::Load() {
return absl::OkStatus();
}
absl::Status MessageEditor::Load() { return absl::OkStatus(); }
absl::Status MessageEditor::Update() {
if (rom()->is_loaded() && !data_loaded_) {
@@ -152,6 +150,9 @@ void MessageEditor::DrawMessageList() {
}
void MessageEditor::DrawCurrentMessage() {
if (!rom()->is_loaded()) {
return;
}
Button(absl::StrCat("Message ", current_message_.ID).c_str());
if (InputTextMultiline("##MessageEditor",
&parsed_messages_[current_message_.ID],