SaveTool: add "unequip" button to shield parts and BL projectiles.
It doesn't actually unequip them (the game has no concept of that, unlike accessories), but replaces the ID with one that doesn't exist.
This commit is contained in:
parent
42b4974b43
commit
918ead0733
1 changed files with 14 additions and 0 deletions
|
@ -435,6 +435,20 @@ void SaveTool::drawWeaponEditor(Weapon& weapon) {
|
|||
auto& part = weapon.parts[_selectedWeaponPart];
|
||||
|
||||
ImGui::Text("ID: %i", part.id);
|
||||
if(weapon.type == WeaponType::Shield ||
|
||||
(weapon.type == WeaponType::BulletLauncher && _selectedWeaponPart != 0))
|
||||
{
|
||||
ImGui::SameLine();
|
||||
if(ImGui::SmallButton("Unequip")) {
|
||||
part.id = -1;
|
||||
}
|
||||
if(weapon.type == WeaponType::Shield && _selectedWeaponPart == 0) {
|
||||
drawTooltip("This will make the whole shield and its accessories invisible.");
|
||||
}
|
||||
else {
|
||||
drawTooltip("This will make accessories invisible as well.");
|
||||
}
|
||||
}
|
||||
|
||||
if(ImGui::BeginChild("##PartDetails", {0.0f, 0.0f}, true)) {
|
||||
ImGui::TextUnformatted("Styles:");
|
||||
|
|
Loading…
Reference in a new issue