mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
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
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:
parent
8c648dff85
commit
6f35081013
1 changed files with 17 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue