Fix eye colors, color selectors and Begin/End.

This commit is contained in:
Ottermandias 2021-09-17 13:39:27 +02:00
parent f2c3bc35c3
commit c3d0d24713
8 changed files with 34 additions and 15 deletions

View file

@ -8,6 +8,7 @@
OddEyes,
IrisSmall,
IrisLarge,
IrisSize,
MidlanderM,
HighlanderM,
WildwoodM,

View file

@ -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<CharaMakeParams.Menu?>()
@ -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)
switch (c)
{
case CustomizationId.HighlightColor:
case CustomizationId.EyeColorL:
case CustomizationId.EyeColorR:
return CharaMakeParams.MenuType.ColorPicker;
}
var menu = row.Menus
.Cast<CharaMakeParams.Menu?>()
@ -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] =

Binary file not shown.

View file

@ -5,8 +5,8 @@
<PlatformTarget>x64</PlatformTarget>
<RootNamespace>Glamourer</RootNamespace>
<AssemblyName>Glamourer</AssemblyName>
<FileVersion>0.0.5.0</FileVersion>
<AssemblyVersion>0.0.5.0</AssemblyVersion>
<FileVersion>0.0.5.1</FileVersion>
<AssemblyVersion>0.0.5.1</AssemblyVersion>
<Company>SoftOtter</Company>
<Product>Glamourer</Product>
<Copyright>Copyright © 2020</Copyright>

View file

@ -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,

View file

@ -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
{

View file

@ -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)
{

View file

@ -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,