feat(editor): switch between project zones via File > Project > Switch Zone
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run

This commit is contained in:
Kelsi 2026-05-05 09:42:58 -07:00
parent 8c648dff85
commit 6f35081013

View file

@ -158,7 +158,23 @@ void EditorUI::renderMenuBar(EditorApp& app) {
}
ImGui::Separator();
ImGui::InputText("Path##proj", projPathBuf, sizeof(projPathBuf));
ImGui::Text("Zones: %zu", app.getProject().zones.size());
if (!app.getProject().zones.empty() && ImGui::BeginMenu("Switch Zone")) {
for (int i = 0; i < static_cast<int>(app.getProject().zones.size()); i++) {
auto& z = app.getProject().zones[i];
char label[128];
std::snprintf(label, sizeof(label), "%s [%d,%d]",
z.mapName.c_str(), z.tileX, z.tileY);
if (ImGui::MenuItem(label)) {
// Save current zone first, then load the selected one
app.quickSave();
app.loadADT(z.mapName, z.tileX, z.tileY);
}
}
ImGui::EndMenu();
}
ImGui::Text("Project: %s (%zu zones)",
app.getProject().name.c_str(),
app.getProject().zones.size());
ImGui::EndMenu();
}
ImGui::Separator();