mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-13 12:14:18 +01:00
Fix offhand handling.
This commit is contained in:
parent
279a5d6923
commit
a310e01296
3 changed files with 5 additions and 7 deletions
|
|
@ -190,7 +190,9 @@ public class EquipmentDrawer
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var change = combo.Draw(weapon.Name, weapon.ItemId, 320 * ImGuiHelpers.GlobalScale);
|
var change = combo.Draw(weapon.Name, weapon.ItemId, 320 * ImGuiHelpers.GlobalScale);
|
||||||
if (!offType.IsOffhandType() && weapon.ModelId.Value != 0)
|
if (change)
|
||||||
|
weapon = combo.CurrentSelection;
|
||||||
|
else if (!offType.IsOffhandType() && weapon.ModelId.Value != 0)
|
||||||
{
|
{
|
||||||
ImGuiUtil.HoverTooltip("Right-click to clear.");
|
ImGuiUtil.HoverTooltip("Right-click to clear.");
|
||||||
if (ImGui.IsItemClicked(ImGuiMouseButton.Right))
|
if (ImGui.IsItemClicked(ImGuiMouseButton.Right))
|
||||||
|
|
@ -199,10 +201,6 @@ public class EquipmentDrawer
|
||||||
weapon = ItemManager.NothingItem(offType);
|
weapon = ItemManager.NothingItem(offType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (change)
|
|
||||||
{
|
|
||||||
weapon = combo.CurrentSelection;
|
|
||||||
}
|
|
||||||
|
|
||||||
return change;
|
return change;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ public class ActorPanel
|
||||||
|
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
var oh = _state.ModelData.Item(EquipSlot.OffHand);
|
var oh = _state.ModelData.Item(EquipSlot.OffHand);
|
||||||
if (_equipmentDrawer.DrawMainhand(oh, false, out var newOh))
|
if (_equipmentDrawer.DrawOffhand(oh, newMh.Type, out var newOh))
|
||||||
_stateManager.ChangeEquip(_state, EquipSlot.OffHand, newOh, newOhStain, StateChanged.Source.Manual);
|
_stateManager.ChangeEquip(_state, EquipSlot.OffHand, newOh, newOhStain, StateChanged.Source.Manual);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ public class DesignPanel
|
||||||
|
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
var oh = _selector.Selected!.DesignData.Item(EquipSlot.OffHand);
|
var oh = _selector.Selected!.DesignData.Item(EquipSlot.OffHand);
|
||||||
if (_equipmentDrawer.DrawMainhand(oh, false, out var newOh))
|
if (_equipmentDrawer.DrawOffhand(oh, newMh.Type, out var newOh))
|
||||||
_manager.ChangeWeapon(_selector.Selected!, EquipSlot.OffHand, newOh);
|
_manager.ChangeWeapon(_selector.Selected!, EquipSlot.OffHand, newOh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue