mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
fix(editor): Clear All shows toast when nothing to clear
This commit is contained in:
parent
d36631d242
commit
ec8e3a41b5
1 changed files with 6 additions and 2 deletions
|
|
@ -147,8 +147,12 @@ void EditorUI::renderMenuBar(EditorApp& app) {
|
|||
}
|
||||
if (ImGui::MenuItem("Generate Complete Zone", nullptr, false, app.hasTerrainLoaded()))
|
||||
app.generateCompleteZone();
|
||||
if (ImGui::MenuItem("Clear All Objects/NPCs", nullptr, false, app.hasTerrainLoaded()))
|
||||
app.clearAllObjects();
|
||||
if (ImGui::MenuItem("Clear All Objects/NPCs", nullptr, false, app.hasTerrainLoaded())) {
|
||||
if (app.getObjectPlacer().objectCount() > 0 || app.getNpcSpawner().spawnCount() > 0)
|
||||
app.clearAllObjects();
|
||||
else
|
||||
app.showToast("Nothing to clear");
|
||||
}
|
||||
ImGui::Separator();
|
||||
if (ImGui::MenuItem("Quick Save", "Ctrl+S", false, app.hasTerrainLoaded()))
|
||||
app.quickSave();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue