diff --git a/Glamourer.GameData/Customization/CustomName.cs b/Glamourer.GameData/Customization/CustomName.cs index 6476b85..2d96f76 100644 --- a/Glamourer.GameData/Customization/CustomName.cs +++ b/Glamourer.GameData/Customization/CustomName.cs @@ -8,6 +8,7 @@ OddEyes, IrisSmall, IrisLarge, + IrisSize, MidlanderM, HighlanderM, WildwoodM, diff --git a/Glamourer.GameData/Customization/CustomizationOptions.cs b/Glamourer.GameData/Customization/CustomizationOptions.cs index ef2176f..6cc6529 100644 --- a/Glamourer.GameData/Customization/CustomizationOptions.cs +++ b/Glamourer.GameData/Customization/CustomizationOptions.cs @@ -191,7 +191,7 @@ namespace Glamourer.Customization set.FeaturesTattoos = featureDict; - set.OptionName = ((CustomizationId[]) Enum.GetValues(typeof(CustomizationId))).Select(c => + var nameArray = ((CustomizationId[]) Enum.GetValues(typeof(CustomizationId))).Select(c => { var menu = row.Menus .Cast() @@ -211,14 +211,19 @@ namespace Glamourer.Customization var textRow = _lobby.GetRow(menu.Value.Id); return textRow?.Text.ToString() ?? c.ToDefaultName(); }).ToArray(); + nameArray[(int) CustomizationId.EyeColorL] = nameArray[(int) CustomizationId.EyeColorR]; + nameArray[(int) CustomizationId.EyeColorR] = GetName(CustomName.OddEyes); + set.OptionName = nameArray; set.Types = ((CustomizationId[]) Enum.GetValues(typeof(CustomizationId))).Select(c => { - if (c == CustomizationId.HighlightColor) - return CharaMakeParams.MenuType.ColorPicker; - - if (c == CustomizationId.EyeColorL) - return CharaMakeParams.MenuType.ColorPicker; + switch (c) + { + case CustomizationId.HighlightColor: + case CustomizationId.EyeColorL: + case CustomizationId.EyeColorR: + return CharaMakeParams.MenuType.ColorPicker; + } var menu = row.Menus .Cast() @@ -297,6 +302,7 @@ namespace Glamourer.Customization _names[(int) CustomName.OddEyes] = _lobby.GetRow(2125)?.Text ?? "Odd Eyes"; _names[(int) CustomName.IrisSmall] = _lobby.GetRow(1076)?.Text ?? "Small"; _names[(int) CustomName.IrisLarge] = _lobby.GetRow(1075)?.Text ?? "Large"; + _names[(int) CustomName.IrisSize] = _lobby.GetRow(244)?.Text ?? "Iris Size"; _names[(int) CustomName.MidlanderM] = subRace.GetRow((int) SubRace.Midlander)?.Masculine.ToString() ?? SubRace.Midlander.ToName(); _names[(int) CustomName.MidlanderF] = subRace.GetRow((int) SubRace.Midlander)?.Feminine.ToString() ?? SubRace.Midlander.ToName(); _names[(int) CustomName.HighlanderM] = diff --git a/Glamourer.zip b/Glamourer.zip index dc70257..105729d 100644 Binary files a/Glamourer.zip and b/Glamourer.zip differ diff --git a/Glamourer/Glamourer.csproj b/Glamourer/Glamourer.csproj index d4a2e86..0e64a7b 100644 --- a/Glamourer/Glamourer.csproj +++ b/Glamourer/Glamourer.csproj @@ -5,8 +5,8 @@ x64 Glamourer Glamourer - 0.0.5.0 - 0.0.5.0 + 0.0.5.1 + 0.0.5.1 SoftOtter Glamourer Copyright © 2020 diff --git a/Glamourer/Glamourer.json b/Glamourer/Glamourer.json index abce03e..ef9879b 100644 --- a/Glamourer/Glamourer.json +++ b/Glamourer/Glamourer.json @@ -5,7 +5,7 @@ "Description": "Adds functionality to change and store appearance of players, customization and equip. Requires Penumbra to be installed and activated to work. Can also add preview options to the Changed Items tab for Penumbra.", "Tags": ["Appearance", "Glamour", "Race", "Outfit", "Armor", "Clothes", "Skins", "Customization", "Design", "Character"], "InternalName": "Glamourer", - "AssemblyVersion": "0.0.5.0", + "AssemblyVersion": "0.0.5.1", "RepoUrl": "https://github.com/Ottermandias/Glamourer", "ApplicableVersion": "any", "DalamudApiLevel": 4, diff --git a/Glamourer/Gui/Interface.cs b/Glamourer/Gui/Interface.cs index cb4442c..f9c6ce0 100644 --- a/Glamourer/Gui/Interface.cs +++ b/Glamourer/Gui/Interface.cs @@ -69,7 +69,10 @@ namespace Glamourer.Gui ImGui.SetNextWindowSizeConstraints(Vector2.One * MinWindowWidth * ImGui.GetIO().FontGlobalScale, Vector2.One * 5000 * ImGui.GetIO().FontGlobalScale); if (!ImGui.Begin(_glamourerHeader, ref _visible)) + { + ImGui.End(); return; + } try { diff --git a/Glamourer/Gui/InterfaceCustomization.cs b/Glamourer/Gui/InterfaceCustomization.cs index a6ccba2..2e5c418 100644 --- a/Glamourer/Gui/InterfaceCustomization.cs +++ b/Glamourer/Gui/InterfaceCustomization.cs @@ -52,7 +52,7 @@ namespace Glamourer.Gui var ret = false; var tmp = value + 1; ImGui.SetNextItemWidth(_inputIntSize); - if (ImGui.InputInt(label, ref tmp, 1) && tmp != value + 1 && tmp >= minValue && tmp <= maxValue) + if (ImGui.InputInt(label, ref tmp, 1, 1, ImGuiInputTextFlags.EnterReturnsTrue) && tmp != value + 1 && tmp >= minValue && tmp <= maxValue) { value = tmp - 1; ret = true; @@ -97,7 +97,7 @@ namespace Glamourer.Gui { if (InputInt($"##text_{id}", ref current, 1, count)) { - customization[id] = set.Data(id, current - 1).Value; + customization[id] = set.Data(id, current).Value; ret = true; } @@ -394,7 +394,16 @@ namespace Glamourer.Gui return false; } - private static readonly CustomizationId[] AllCustomizations = (CustomizationId[]) Enum.GetValues(typeof(CustomizationId)); + private static CustomizationId[] GetCustomizationOrder() + { + var ret = (CustomizationId[])Enum.GetValues(typeof(CustomizationId)); + ret[(int) CustomizationId.TattooColor] = CustomizationId.EyeColorL; + ret[(int) CustomizationId.EyeColorL] = CustomizationId.EyeColorR; + ret[(int) CustomizationId.EyeColorR] = CustomizationId.TattooColor; + return ret; + } + + private static readonly CustomizationId[] AllCustomizations = GetCustomizationOrder(); private bool DrawCustomization(ref CharacterCustomization custom) { @@ -457,7 +466,7 @@ namespace Glamourer.Gui } tmp = custom.SmallIris; - if (ImGui.Checkbox($"{Glamourer.Customization.GetName(CustomName.IrisSmall)} {set.Option(CustomizationId.EyeColorL)}", + if (ImGui.Checkbox($"{Glamourer.Customization.GetName(CustomName.IrisSmall)} {Glamourer.Customization.GetName(CustomName.IrisSize)}", ref tmp) && tmp != custom.SmallIris) { diff --git a/repo.json b/repo.json index b6acb3f..a06812d 100644 --- a/repo.json +++ b/repo.json @@ -4,8 +4,8 @@ "Name": "Glamourer", "Description": "Adds functionality to change appearance of players. Requires Penumbra to be installed and activated to work.", "InternalName": "Glamourer", - "AssemblyVersion": "0.0.5.0", - "TestingAssemblyVersion": "0.0.5.0", + "AssemblyVersion": "0.0.5.1", + "TestingAssemblyVersion": "0.0.5.1", "RepoUrl": "https://github.com/Ottermandias/Glamourer", "ApplicableVersion": "any", "DalamudApiLevel": 4,