diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-18 19:21:11 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-18 19:21:11 +0100 |
commit | 1ff82119667872c99d564bd965abacc6e77e4423 (patch) | |
tree | ef1bed8ff42c009dd05d04497d825a83a7ee6190 /editor | |
parent | 110b0b262d5cc402737e3d9d68681c7e1eb792ec (diff) |
editor: add deleting scenery to context menu
Diffstat (limited to 'editor')
-rw-r--r-- | editor/imgui.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/editor/imgui.cpp b/editor/imgui.cpp index 6904f0f5..d4bb7f65 100644 --- a/editor/imgui.cpp +++ b/editor/imgui.cpp @@ -146,18 +146,19 @@ void app::do_popup_menu() { fm_assert(target != popup_target_type::none && sc != nullptr); + ImGui::SeparatorText("Setup"); const auto i = sc->index(); if (ImGui::MenuItem("Activate", nullptr, false, sc->can_activate(i))) sc->activate(i); - if (auto next_rot = sc->atlas->next_rotation_from(sc->r); - next_rot != sc->r && ImGui::MenuItem("Rotate", nullptr, false, next_rot != sc->r)) - sc->rotate(i, next_rot); - - ImGui::Separator(); - if (bool b_ins = sc && !check_inspector_exists(_popup_target); ImGui::MenuItem("Inspect", nullptr, false, b_ins)) inspectors.push_back(std::exchange(_popup_target, {})); + ImGui::SeparatorText("Modify"); + if (auto next_rot = sc->atlas->next_rotation_from(sc->r); + next_rot != sc->r && ImGui::MenuItem("Rotate", nullptr, false, next_rot != sc->r)) + sc->rotate(i, next_rot); + if (ImGui::MenuItem("Delete", nullptr, false)) + sc->chunk().remove_entity(sc->index()); } } |