From 57f1a3ccefbbde9f1868078bd8fb0c261f484659 Mon Sep 17 00:00:00 2001 From: Guillaume Jacquemin Date: Thu, 12 Dec 2024 15:39:19 +0100 Subject: [PATCH] Application: make BS/ES swapping non-advanced. --- .../Application_MassViewer_Weapons.cpp | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/src/Application/Application_MassViewer_Weapons.cpp b/src/Application/Application_MassViewer_Weapons.cpp index 2c1feab..219300c 100644 --- a/src/Application/Application_MassViewer_Weapons.cpp +++ b/src/Application/Application_MassViewer_Weapons.cpp @@ -246,26 +246,24 @@ Application::drawWeaponEditor(GameObjects::Weapon& weapon) { weapon.name = name_buf.data(); } - if(conf().advancedMode()) { - if(weapon.type == GameObjects::Weapon::Type::BulletShooter) { - ImGui::Button("Import energy shooter by dragging it here"); - if(ImGui::BeginDragDropTarget()) { - if(const ImGuiPayload* payload = ImGui::AcceptDragDropPayload("EShooter")) { - std::uint32_t index = *static_cast(payload->Data); - weapon = _currentMass->energyShooters()[index]; - } - ImGui::EndDragDropTarget(); + if(weapon.type == GameObjects::Weapon::Type::BulletShooter) { + ImGui::Button("Import energy shooter by dragging it here"); + if(ImGui::BeginDragDropTarget()) { + if(const ImGuiPayload* payload = ImGui::AcceptDragDropPayload("EShooter")) { + std::uint32_t index = *static_cast(payload->Data); + weapon = _currentMass->energyShooters()[index]; } + ImGui::EndDragDropTarget(); } - else if(weapon.type == GameObjects::Weapon::Type::EnergyShooter) { - ImGui::Button("Import bullet shooter by dragging it here"); - if(ImGui::BeginDragDropTarget()) { - if(const ImGuiPayload* payload = ImGui::AcceptDragDropPayload("BShooter")) { - std::uint32_t index = *static_cast(payload->Data); - weapon = _currentMass->bulletShooters()[index]; - } - ImGui::EndDragDropTarget(); + } + else if(weapon.type == GameObjects::Weapon::Type::EnergyShooter) { + ImGui::Button("Import bullet shooter by dragging it here"); + if(ImGui::BeginDragDropTarget()) { + if(const ImGuiPayload* payload = ImGui::AcceptDragDropPayload("BShooter")) { + std::uint32_t index = *static_cast(payload->Data); + weapon = _currentMass->bulletShooters()[index]; } + ImGui::EndDragDropTarget(); } }