mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 18:27:24 +01:00
Allow change of bodytype.
This commit is contained in:
parent
d81a6b7f6f
commit
fcca756e20
4 changed files with 28 additions and 2 deletions
|
|
@ -1,11 +1,12 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Numerics;
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
using Glamourer.GameData;
|
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
using OtterGui;
|
using OtterGui;
|
||||||
using OtterGui.Raii;
|
using OtterGui.Raii;
|
||||||
using Penumbra.GameData.Enums;
|
using Penumbra.GameData.Enums;
|
||||||
|
using Penumbra.GameData.Structs;
|
||||||
|
|
||||||
namespace Glamourer.Gui.Customization;
|
namespace Glamourer.Gui.Customization;
|
||||||
|
|
||||||
|
|
@ -75,4 +76,17 @@ public partial class CustomizationDrawer
|
||||||
if (_lockedRedraw && ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
|
if (_lockedRedraw && ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
|
||||||
ImGui.SetTooltip("The race can not be changed as this requires a redraw of the character, which is not supported for this actor.");
|
ImGui.SetTooltip("The race can not be changed as this requires a redraw of the character, which is not supported for this actor.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DrawBodyType()
|
||||||
|
{
|
||||||
|
if (_customize.BodyType.Value == 1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!ImGuiUtil.DrawDisabledButton($"Reset Body Type {_customize.BodyType.Value} to Default",
|
||||||
|
new Vector2(_raceSelectorWidth + _framedIconSize.X + ImGui.GetStyle().ItemSpacing.X, 0), string.Empty, _lockedRedraw))
|
||||||
|
return;
|
||||||
|
|
||||||
|
Changed |= CustomizeFlag.BodyType;
|
||||||
|
_customize.BodyType = (CustomizeValue)1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,8 @@ public partial class CustomizationDrawer(DalamudPluginInterface pi, CustomizeSer
|
||||||
return DrawArtisan();
|
return DrawArtisan();
|
||||||
|
|
||||||
DrawRaceGenderSelector();
|
DrawRaceGenderSelector();
|
||||||
|
DrawBodyType();
|
||||||
|
|
||||||
_set = _service.Manager.GetSet(_customize.Clan, _customize.Gender);
|
_set = _service.Manager.GetSet(_customize.Clan, _customize.Gender);
|
||||||
|
|
||||||
foreach (var id in _set.Order[CharaMakeParams.MenuType.Percentage])
|
foreach (var id in _set.Order[CharaMakeParams.MenuType.Percentage])
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,16 @@ public sealed class CustomizeService(
|
||||||
applied |= CustomizeFlag.Gender;
|
applied |= CustomizeFlag.Gender;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (applyWhich.HasFlag(CustomizeFlag.BodyType))
|
||||||
|
{
|
||||||
|
if (oldValues[CustomizeIndex.BodyType] != newValues[CustomizeIndex.BodyType])
|
||||||
|
{
|
||||||
|
ret.Set(CustomizeIndex.BodyType, newValues[CustomizeIndex.BodyType]);
|
||||||
|
changed |= CustomizeFlag.BodyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
applied |= CustomizeFlag.BodyType;
|
||||||
|
}
|
||||||
|
|
||||||
var set = Manager.GetSet(ret.Clan, ret.Gender);
|
var set = Manager.GetSet(ret.Clan, ret.Gender);
|
||||||
applyWhich = applyWhich.FixApplication(set);
|
applyWhich = applyWhich.FixApplication(set);
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3073db1fc8a1894a4af8974ea9c22a63acd7316e
|
Subproject commit c1c9fb6d83be8b05dfb3f35031c05781daad1fc7
|
||||||
Loading…
Add table
Add a link
Reference in a new issue