mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-30 12:23:42 +01:00
.
This commit is contained in:
parent
63e82d19dc
commit
e57538561f
34 changed files with 2428 additions and 720 deletions
|
|
@ -2,6 +2,7 @@
|
|||
using Glamourer.Customization;
|
||||
using Glamourer.Designs;
|
||||
using Glamourer.Gui.Customization;
|
||||
using Glamourer.Gui.Equipment;
|
||||
using Glamourer.Interop;
|
||||
using Glamourer.Interop.Penumbra;
|
||||
using Glamourer.State;
|
||||
|
|
@ -21,24 +22,17 @@ public class DesignPanel
|
|||
private readonly DesignManager _manager;
|
||||
private readonly CustomizationDrawer _customizationDrawer;
|
||||
private readonly StateManager _state;
|
||||
private readonly PenumbraService _penumbra;
|
||||
private readonly UpdateSlotService _updateSlot;
|
||||
private readonly WeaponService _weaponService;
|
||||
private readonly ChangeCustomizeService _changeCustomizeService;
|
||||
private readonly EquipmentDrawer _equipmentDrawer;
|
||||
|
||||
public DesignPanel(DesignFileSystemSelector selector, CustomizationDrawer customizationDrawer, DesignManager manager, ObjectManager objects,
|
||||
StateManager state, PenumbraService penumbra, ChangeCustomizeService changeCustomizeService, WeaponService weaponService,
|
||||
UpdateSlotService updateSlot)
|
||||
StateManager state, EquipmentDrawer equipmentDrawer)
|
||||
{
|
||||
_selector = selector;
|
||||
_customizationDrawer = customizationDrawer;
|
||||
_manager = manager;
|
||||
_objects = objects;
|
||||
_state = state;
|
||||
_penumbra = penumbra;
|
||||
_changeCustomizeService = changeCustomizeService;
|
||||
_weaponService = weaponService;
|
||||
_updateSlot = updateSlot;
|
||||
_selector = selector;
|
||||
_customizationDrawer = customizationDrawer;
|
||||
_manager = manager;
|
||||
_objects = objects;
|
||||
_state = state;
|
||||
_equipmentDrawer = equipmentDrawer;
|
||||
}
|
||||
|
||||
public void Draw()
|
||||
|
|
@ -60,5 +54,38 @@ public class DesignPanel
|
|||
}
|
||||
|
||||
_customizationDrawer.Draw(design.DesignData.Customize, design.WriteProtected());
|
||||
|
||||
foreach (var slot in EquipSlotExtensions.EqdpSlots)
|
||||
{
|
||||
var stain = design.DesignData.Stain(slot);
|
||||
if (_equipmentDrawer.DrawStain(stain, slot, out var newStain))
|
||||
_manager.ChangeStain(design, slot, newStain.RowIndex);
|
||||
|
||||
ImGui.SameLine();
|
||||
var armor = design.DesignData.Item(slot);
|
||||
if (_equipmentDrawer.DrawArmor(armor, slot, out var newArmor, design.DesignData.Customize.Gender, design.DesignData.Customize.Race))
|
||||
_manager.ChangeEquip(design, slot, newArmor);
|
||||
}
|
||||
|
||||
var mhStain = design.DesignData.Stain(EquipSlot.MainHand);
|
||||
if (_equipmentDrawer.DrawStain(mhStain, EquipSlot.MainHand, out var newMhStain))
|
||||
_manager.ChangeStain(design, EquipSlot.MainHand, newMhStain.RowIndex);
|
||||
|
||||
ImGui.SameLine();
|
||||
var mh = design.DesignData.Item(EquipSlot.MainHand);
|
||||
if (_equipmentDrawer.DrawMainhand(mh, true, out var newMh))
|
||||
_manager.ChangeWeapon(design, EquipSlot.MainHand, newMh);
|
||||
|
||||
if (newMh.Type.Offhand() is not FullEquipType.Unknown)
|
||||
{
|
||||
var ohStain = design.DesignData.Stain(EquipSlot.OffHand);
|
||||
if (_equipmentDrawer.DrawStain(ohStain, EquipSlot.OffHand, out var newOhStain))
|
||||
_manager.ChangeStain(design, EquipSlot.OffHand, newOhStain.RowIndex);
|
||||
|
||||
ImGui.SameLine();
|
||||
var oh = design.DesignData.Item(EquipSlot.OffHand);
|
||||
if (_equipmentDrawer.DrawMainhand(oh, false, out var newOh))
|
||||
_manager.ChangeWeapon(design, EquipSlot.OffHand, newOh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue