fix(editor): About dialog now works, moved outside menu bar scope

- About dialog was broken because ImGui::OpenPopup inside BeginMenu
  has wrong ID scope — popup never appeared
- Changed to a proper ImGui::Begin window with showAbout_ flag
- Closeable with X button or clicking About again
- Shows version, author, feature summary, and tech stack
This commit is contained in:
Kelsi 2026-05-05 09:11:46 -07:00
parent bab1318ec9
commit 560c4a40c0
2 changed files with 10 additions and 6 deletions

View file

@ -216,12 +216,16 @@ void EditorUI::renderMenuBar(EditorApp& app) {
if (ImGui::BeginMenu("Help")) {
if (ImGui::MenuItem("Keyboard Shortcuts", "F1")) showHelp_ = !showHelp_;
ImGui::Separator();
if (ImGui::MenuItem("About Wowee Editor")) {
ImGui::OpenPopup("AboutEditor");
}
if (ImGui::MenuItem("About Wowee Editor")) showAbout_ = true;
ImGui::EndMenu();
}
if (ImGui::BeginPopup("AboutEditor")) {
ImGui::EndMainMenuBar();
}
// About dialog (must be outside menu bar scope)
if (showAbout_) {
ImGui::SetNextWindowSize(ImVec2(350, 250), ImGuiCond_FirstUseEver);
if (ImGui::Begin("About Wowee World Editor", &showAbout_)) {
ImGui::Text("Wowee World Editor");
ImGui::Text("by Kelsi Davis");
ImGui::Separator();
@ -233,9 +237,8 @@ void EditorUI::renderMenuBar(EditorApp& app) {
ImGui::Text("Export: ADT + WDT + JSON (zone manifest)");
ImGui::Text("9k+ lines, WoW 3.3.5a ADT/WDT format");
ImGui::Text("Built with SDL2 / Vulkan / ImGui");
ImGui::EndPopup();
}
ImGui::EndMainMenuBar();
ImGui::End();
}
// Help overlay

View file

@ -43,6 +43,7 @@ private:
bool showLoadDialog_ = false;
bool showSaveDialog_ = false;
bool showHelp_ = false;
bool showAbout_ = false;
char newMapNameBuf_[256] = "CustomZone";
int newTileX_ = 32;