Application: make BS/ES swapping non-advanced.
This commit is contained in:
parent
826f53c26b
commit
57f1a3ccef
1 changed files with 15 additions and 17 deletions
|
@ -246,26 +246,24 @@ Application::drawWeaponEditor(GameObjects::Weapon& weapon) {
|
||||||
weapon.name = name_buf.data();
|
weapon.name = name_buf.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(conf().advancedMode()) {
|
if(weapon.type == GameObjects::Weapon::Type::BulletShooter) {
|
||||||
if(weapon.type == GameObjects::Weapon::Type::BulletShooter) {
|
ImGui::Button("Import energy shooter by dragging it here");
|
||||||
ImGui::Button("Import energy shooter by dragging it here");
|
if(ImGui::BeginDragDropTarget()) {
|
||||||
if(ImGui::BeginDragDropTarget()) {
|
if(const ImGuiPayload* payload = ImGui::AcceptDragDropPayload("EShooter")) {
|
||||||
if(const ImGuiPayload* payload = ImGui::AcceptDragDropPayload("EShooter")) {
|
std::uint32_t index = *static_cast<std::uint32_t*>(payload->Data);
|
||||||
std::uint32_t index = *static_cast<std::uint32_t*>(payload->Data);
|
weapon = _currentMass->energyShooters()[index];
|
||||||
weapon = _currentMass->energyShooters()[index];
|
|
||||||
}
|
|
||||||
ImGui::EndDragDropTarget();
|
|
||||||
}
|
}
|
||||||
|
ImGui::EndDragDropTarget();
|
||||||
}
|
}
|
||||||
else if(weapon.type == GameObjects::Weapon::Type::EnergyShooter) {
|
}
|
||||||
ImGui::Button("Import bullet shooter by dragging it here");
|
else if(weapon.type == GameObjects::Weapon::Type::EnergyShooter) {
|
||||||
if(ImGui::BeginDragDropTarget()) {
|
ImGui::Button("Import bullet shooter by dragging it here");
|
||||||
if(const ImGuiPayload* payload = ImGui::AcceptDragDropPayload("BShooter")) {
|
if(ImGui::BeginDragDropTarget()) {
|
||||||
std::uint32_t index = *static_cast<std::uint32_t*>(payload->Data);
|
if(const ImGuiPayload* payload = ImGui::AcceptDragDropPayload("BShooter")) {
|
||||||
weapon = _currentMass->bulletShooters()[index];
|
std::uint32_t index = *static_cast<std::uint32_t*>(payload->Data);
|
||||||
}
|
weapon = _currentMass->bulletShooters()[index];
|
||||||
ImGui::EndDragDropTarget();
|
|
||||||
}
|
}
|
||||||
|
ImGui::EndDragDropTarget();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue