mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-29 20:03:45 +01:00
.
This commit is contained in:
parent
5e6f797af4
commit
803fd1b247
16 changed files with 521 additions and 132 deletions
|
|
@ -1,21 +1,44 @@
|
|||
using System.Numerics;
|
||||
using Glamourer.Customization;
|
||||
using Glamourer.Designs;
|
||||
using Glamourer.Gui.Customization;
|
||||
using Glamourer.Interop;
|
||||
using Glamourer.Interop.Penumbra;
|
||||
using Glamourer.State;
|
||||
using Glamourer.Structs;
|
||||
using ImGuiNET;
|
||||
using OtterGui.Raii;
|
||||
using Penumbra.Api.Enums;
|
||||
using Penumbra.Api.Helpers;
|
||||
using Penumbra.GameData.Enums;
|
||||
|
||||
namespace Glamourer.Gui.Tabs.DesignTab;
|
||||
|
||||
public class DesignPanel
|
||||
{
|
||||
private readonly ObjectManager _objects;
|
||||
private readonly DesignFileSystemSelector _selector;
|
||||
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;
|
||||
|
||||
public DesignPanel(DesignFileSystemSelector selector, CustomizationDrawer customizationDrawer, DesignManager manager)
|
||||
public DesignPanel(DesignFileSystemSelector selector, CustomizationDrawer customizationDrawer, DesignManager manager, ObjectManager objects,
|
||||
StateManager state, PenumbraService penumbra, ChangeCustomizeService changeCustomizeService, WeaponService weaponService,
|
||||
UpdateSlotService updateSlot)
|
||||
{
|
||||
_selector = selector;
|
||||
_customizationDrawer = customizationDrawer;
|
||||
_manager = manager;
|
||||
_selector = selector;
|
||||
_customizationDrawer = customizationDrawer;
|
||||
_manager = manager;
|
||||
_objects = objects;
|
||||
_state = state;
|
||||
_penumbra = penumbra;
|
||||
_changeCustomizeService = changeCustomizeService;
|
||||
_weaponService = weaponService;
|
||||
_updateSlot = updateSlot;
|
||||
}
|
||||
|
||||
public void Draw()
|
||||
|
|
@ -28,6 +51,14 @@ public class DesignPanel
|
|||
if (!child)
|
||||
return;
|
||||
|
||||
if (ImGui.Button("TEST"))
|
||||
{
|
||||
var (id, data) = _objects.PlayerData;
|
||||
|
||||
if (data.Valid && _state.GetOrCreate(id, data.Objects[0], out var state))
|
||||
_state.ApplyDesign(design, state);
|
||||
}
|
||||
|
||||
_customizationDrawer.Draw(design.DesignData.Customize, design.WriteProtected());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue