diff --git a/Glamourer.GameData/Customization/CustomizationOptions.cs b/Glamourer.GameData/Customization/CustomizationOptions.cs index a4e9212..c6fbee5 100644 --- a/Glamourer.GameData/Customization/CustomizationOptions.cs +++ b/Glamourer.GameData/Customization/CustomizationOptions.cs @@ -280,9 +280,19 @@ namespace Glamourer.Customization internal CustomizationOptions(DalamudPluginInterface pi, DataManager gameData, ClientLanguage language) { - _cmpFile = new CmpFile(gameData); + try + { + _cmpFile = new CmpFile(gameData); + } + catch (Exception e) + { + throw new Exception("READ THIS\n======== Could not obtain the human.cmp file which is necessary for color sets.\n" + + "======== This usually indicates an error with your index files caused by TexTools modifications.\n" + + "======== If you have used TexTools before, you will probably need to start over in it to use Glamourer.", e); + } + _customizeSheet = gameData.GetExcelSheet()!; - _lobby = gameData.GetExcelSheet()!; + _lobby = gameData.GetExcelSheet()!; var tmp = gameData.Excel.GetType()!.GetMethod("GetSheet", BindingFlags.Instance | BindingFlags.NonPublic)! .MakeGenericMethod(typeof(CharaMakeParams))!.Invoke(gameData.Excel, new object?[] { diff --git a/Glamourer.zip b/Glamourer.zip index d7215b4..83ab242 100644 Binary files a/Glamourer.zip and b/Glamourer.zip differ diff --git a/Glamourer/Glamourer.csproj b/Glamourer/Glamourer.csproj index 8d8f294..c9b2217 100644 --- a/Glamourer/Glamourer.csproj +++ b/Glamourer/Glamourer.csproj @@ -5,8 +5,8 @@ x64 Glamourer Glamourer - 0.0.7.3 - 0.0.7.3 + 0.0.7.4 + 0.0.7.4 SoftOtter Glamourer Copyright © 2020 diff --git a/Glamourer/Glamourer.json b/Glamourer/Glamourer.json index a5ed5e8..bb9389e 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.7.3", + "AssemblyVersion": "0.0.7.4", "RepoUrl": "https://github.com/Ottermandias/Glamourer", "ApplicableVersion": "any", "DalamudApiLevel": 5, diff --git a/Glamourer/Gui/InterfaceActorPanel.cs b/Glamourer/Gui/InterfaceActorPanel.cs index c41995c..49f1914 100644 --- a/Glamourer/Gui/InterfaceActorPanel.cs +++ b/Glamourer/Gui/InterfaceActorPanel.cs @@ -91,12 +91,11 @@ namespace Glamourer.Gui if (!applyButton) return false; - var text = ImGui.GetClipboardText(); - if (!text.Any()) - return false; - try { + var text = ImGui.GetClipboardText(); + if (!text.Any()) + return false; var save = CharacterSave.FromString(text); ConditionalApply(save, _player!); } diff --git a/Glamourer/Gui/InterfaceCustomization.cs b/Glamourer/Gui/InterfaceCustomization.cs index be5f3ab..02a14c2 100644 --- a/Glamourer/Gui/InterfaceCustomization.cs +++ b/Glamourer/Gui/InterfaceCustomization.cs @@ -221,6 +221,7 @@ namespace Glamourer.Gui { var custom = set.Data(id, i); var icon = Glamourer.Customization.GetIcon(custom.IconId); + ImGui.BeginGroup(); if (ImGui.ImageButton(icon.ImGuiHandle, _iconSize)) { value = custom; @@ -234,6 +235,11 @@ namespace Glamourer.Gui ImGui.Image(icon.ImGuiHandle, new Vector2(icon.Width, icon.Height)); } + var text = custom.Value.ToString(); + var textWidth = ImGui.CalcTextSize(text).X; + ImGui.SetCursorPosX(ImGui.GetCursorPosX() + (_iconSize.X - textWidth + 2 * ImGui.GetStyle().FramePadding.X)/2); + ImGui.Text(text); + ImGui.EndGroup(); if (i % 8 != 7) ImGui.SameLine(); } @@ -285,7 +291,7 @@ namespace Glamourer.Gui if (id == CustomizationId.Hairstyle && customization.Race == Race.Hrothgar) customization[CustomizationId.Face] = (byte) ((customization[CustomizationId.Hairstyle] + 1) / 2); - ImGui.Text(label); + ImGui.Text($"{label} ({custom.Value.Value})"); ImGuiCustom.HoverTooltip(tooltip); return ret; diff --git a/repo.json b/repo.json index e2c3855..cef9a72 100644 --- a/repo.json +++ b/repo.json @@ -6,8 +6,8 @@ "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.7.3", - "TestingAssemblyVersion": "0.0.7.3", + "AssemblyVersion": "0.0.7.4", + "TestingAssemblyVersion": "0.0.7.4", "RepoUrl": "https://github.com/Ottermandias/Glamourer", "ApplicableVersion": "any", "DalamudApiLevel": 5,