Refactor map properties handling in Overworld Editor for improved clarity and performance

- Rearranged include statements for better organization and reduced redundancy.
- Enhanced the DrawSimplifiedMapSettings method by improving formatting and readability.
- Streamlined the logic for handling world and map changes, ensuring more efficient updates.
- Updated the DrawMapPropertiesPanel and related methods to improve layout and user interaction.
- Refactored overlay handling logic to enhance maintainability and clarity in the Overworld class.
This commit is contained in:
scawful
2025-09-27 19:42:32 -04:00
parent 0460a6f638
commit 7815f8cc85
5 changed files with 873 additions and 574 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -444,10 +444,7 @@ void OverworldEditor::DrawOverworldMapSettings() {
// World selector (always present)
TableNextColumn();
ImGui::SetNextItemWidth(120.f);
if (ImGui::Combo("##world", &current_world_, kWorldList.data(), 3)) {
// Update current map when world changes
RefreshOverworldMap();
}
ImGui::Combo("##world", &current_world_, kWorldList.data(), 3);
// Area Graphics (always present)
TableNextColumn();
@@ -2170,18 +2167,7 @@ void OverworldEditor::DrawMapPropertiesPanel() {
Text("World");
TableNextColumn();
ImGui::SetNextItemWidth(100.f);
if (ImGui::Combo("##world", &current_world_, kWorldList.data(), 3)) {
// Update current map based on world change
if (current_map_ >= 0x40 && current_world_ == 0) {
current_map_ -= 0x40;
} else if (current_map_ < 0x40 && current_world_ == 1) {
current_map_ += 0x40;
} else if (current_map_ < 0x80 && current_world_ == 2) {
current_map_ += 0x80;
} else if (current_map_ >= 0x80 && current_world_ != 2) {
current_map_ -= 0x80;
}
}
ImGui::Combo("##world", &current_world_, kWorldList.data(), 3);
TableNextColumn();
Text("Area Graphics");