mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-18 05:27:43 +01:00
Remove PalettePlusChecker and config options to disable Advanced Customization and Advanced Dyes.
This commit is contained in:
parent
425c9471fb
commit
528aae7eee
14 changed files with 66 additions and 172 deletions
|
|
@ -11,7 +11,6 @@ using Glamourer.Interop.Penumbra;
|
|||
using Glamourer.Interop.Structs;
|
||||
using Glamourer.State;
|
||||
using ImGuiNET;
|
||||
using OtterGui;
|
||||
using OtterGui.Classes;
|
||||
using OtterGui.Text;
|
||||
using Penumbra.GameData.Actors;
|
||||
|
|
@ -304,9 +303,6 @@ public sealed class DesignQuickBar : Window, IDisposable
|
|||
|
||||
private void DrawRevertAdvancedCustomization(Vector2 buttonSize)
|
||||
{
|
||||
if (!_config.UseAdvancedParameters)
|
||||
return;
|
||||
|
||||
if (!_config.QdbButtons.HasFlag(QdbButtons.RevertAdvanced))
|
||||
return;
|
||||
|
||||
|
|
@ -475,7 +471,7 @@ public sealed class DesignQuickBar : Window, IDisposable
|
|||
++_numButtons;
|
||||
}
|
||||
|
||||
if ((_config.UseAdvancedParameters || _config.UseAdvancedDyes) && _config.QdbButtons.HasFlag(QdbButtons.RevertAdvanced))
|
||||
if (_config.QdbButtons.HasFlag(QdbButtons.RevertAdvanced))
|
||||
++_numButtons;
|
||||
if (_config.QdbButtons.HasFlag(QdbButtons.RevertCustomize))
|
||||
++_numButtons;
|
||||
|
|
|
|||
|
|
@ -38,9 +38,6 @@ public sealed unsafe class AdvancedDyePopup(
|
|||
|
||||
private bool ShouldBeDrawn()
|
||||
{
|
||||
if (!config.UseAdvancedDyes)
|
||||
return false;
|
||||
|
||||
if (_drawIndex is not { Valid: true })
|
||||
return false;
|
||||
|
||||
|
|
@ -58,9 +55,6 @@ public sealed unsafe class AdvancedDyePopup(
|
|||
|
||||
private void DrawButton(MaterialValueIndex index, uint color)
|
||||
{
|
||||
if (!config.UseAdvancedDyes)
|
||||
return;
|
||||
|
||||
ImGui.SameLine();
|
||||
using var id = ImUtf8.PushId(index.SlotIndex | ((int)index.DrawObject << 8));
|
||||
var isOpen = index == _drawIndex;
|
||||
|
|
|
|||
|
|
@ -239,9 +239,6 @@ public class ActorPanel
|
|||
|
||||
private void DrawParameterHeader()
|
||||
{
|
||||
if (!_config.UseAdvancedParameters)
|
||||
return;
|
||||
|
||||
using var h = ImUtf8.CollapsingHeaderId("Advanced Customizations"u8);
|
||||
if (!h)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -180,10 +180,7 @@ public class DesignPanel
|
|||
|
||||
private void DrawCustomizeParameters()
|
||||
{
|
||||
if (!_config.UseAdvancedParameters)
|
||||
return;
|
||||
|
||||
using var h = ImRaii.CollapsingHeader("Advanced Customizations");
|
||||
using var h = ImUtf8.CollapsingHeaderId("Advanced Customizations"u8);
|
||||
if (!h)
|
||||
return;
|
||||
|
||||
|
|
@ -192,10 +189,7 @@ public class DesignPanel
|
|||
|
||||
private void DrawMaterialValues()
|
||||
{
|
||||
if (!_config.UseAdvancedDyes)
|
||||
return;
|
||||
|
||||
using var h = ImRaii.CollapsingHeader("Advanced Dyes");
|
||||
using var h = ImUtf8.CollapsingHeaderId("Advanced Dyes"u8);
|
||||
if (!h)
|
||||
return;
|
||||
|
||||
|
|
@ -204,7 +198,7 @@ public class DesignPanel
|
|||
|
||||
private void DrawCustomizeApplication()
|
||||
{
|
||||
using var id = ImRaii.PushId("Customizations");
|
||||
using var id = ImUtf8.PushId("Customizations"u8);
|
||||
var set = _selector.Selected!.CustomizeSet;
|
||||
var available = set.SettingAvailable | CustomizeFlag.Clan | CustomizeFlag.Gender | CustomizeFlag.BodyType;
|
||||
var flags = _selector.Selected!.ApplyCustomizeExcludingBodyType == 0 ? 0 :
|
||||
|
|
@ -219,55 +213,52 @@ public class DesignPanel
|
|||
}
|
||||
|
||||
var applyClan = _selector.Selected!.DoApplyCustomize(CustomizeIndex.Clan);
|
||||
if (ImGui.Checkbox($"Apply {CustomizeIndex.Clan.ToDefaultName()}", ref applyClan))
|
||||
if (ImUtf8.Checkbox($"Apply {CustomizeIndex.Clan.ToDefaultName()}", ref applyClan))
|
||||
_manager.ChangeApplyCustomize(_selector.Selected!, CustomizeIndex.Clan, applyClan);
|
||||
|
||||
var applyGender = _selector.Selected!.DoApplyCustomize(CustomizeIndex.Gender);
|
||||
if (ImGui.Checkbox($"Apply {CustomizeIndex.Gender.ToDefaultName()}", ref applyGender))
|
||||
if (ImUtf8.Checkbox($"Apply {CustomizeIndex.Gender.ToDefaultName()}", ref applyGender))
|
||||
_manager.ChangeApplyCustomize(_selector.Selected!, CustomizeIndex.Gender, applyGender);
|
||||
|
||||
|
||||
foreach (var index in CustomizationExtensions.All.Where(set.IsAvailable))
|
||||
{
|
||||
var apply = _selector.Selected!.DoApplyCustomize(index);
|
||||
if (ImGui.Checkbox($"Apply {set.Option(index)}", ref apply))
|
||||
if (ImUtf8.Checkbox($"Apply {set.Option(index)}", ref apply))
|
||||
_manager.ChangeApplyCustomize(_selector.Selected!, index, apply);
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawCrestApplication()
|
||||
{
|
||||
using var id = ImRaii.PushId("Crests");
|
||||
using var id = ImUtf8.PushId("Crests"u8);
|
||||
var flags = (uint)_selector.Selected!.Application.Crest;
|
||||
var bigChange = ImGui.CheckboxFlags("Apply All Crests", ref flags, (uint)CrestExtensions.AllRelevant);
|
||||
foreach (var flag in CrestExtensions.AllRelevantSet)
|
||||
{
|
||||
var apply = bigChange ? ((CrestFlag)flags & flag) == flag : _selector.Selected!.DoApplyCrest(flag);
|
||||
if (ImGui.Checkbox($"Apply {flag.ToLabel()} Crest", ref apply) || bigChange)
|
||||
if (ImUtf8.Checkbox($"Apply {flag.ToLabel()} Crest", ref apply) || bigChange)
|
||||
_manager.ChangeApplyCrest(_selector.Selected!, flag, apply);
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawApplicationRules()
|
||||
{
|
||||
using var h = ImRaii.CollapsingHeader("Application Rules");
|
||||
using var h = ImUtf8.CollapsingHeaderId("Application Rules"u8);
|
||||
if (!h)
|
||||
return;
|
||||
|
||||
using var disabled = ImRaii.Disabled(_selector.Selected!.WriteProtected());
|
||||
|
||||
using (var _ = ImRaii.Group())
|
||||
using (var _ = ImUtf8.Group())
|
||||
{
|
||||
DrawCustomizeApplication();
|
||||
ImUtf8.IconDummy();
|
||||
DrawCrestApplication();
|
||||
ImUtf8.IconDummy();
|
||||
if (_config.UseAdvancedParameters)
|
||||
{
|
||||
DrawMetaApplication();
|
||||
ImUtf8.IconDummy();
|
||||
DrawBonusSlotApplication();
|
||||
}
|
||||
DrawMetaApplication();
|
||||
ImUtf8.IconDummy();
|
||||
DrawBonusSlotApplication();
|
||||
}
|
||||
|
||||
ImGui.SameLine(ImGui.GetContentRegionAvail().X / 2);
|
||||
|
|
@ -276,20 +267,20 @@ public class DesignPanel
|
|||
void ApplyEquip(string label, EquipFlag allFlags, bool stain, IEnumerable<EquipSlot> slots)
|
||||
{
|
||||
var flags = (uint)(allFlags & _selector.Selected!.Application.Equip);
|
||||
using var id = ImRaii.PushId(label);
|
||||
using var id = ImUtf8.PushId(label);
|
||||
var bigChange = ImGui.CheckboxFlags($"Apply All {label}", ref flags, (uint)allFlags);
|
||||
if (stain)
|
||||
foreach (var slot in slots)
|
||||
{
|
||||
var apply = bigChange ? ((EquipFlag)flags).HasFlag(slot.ToStainFlag()) : _selector.Selected!.DoApplyStain(slot);
|
||||
if (ImGui.Checkbox($"Apply {slot.ToName()} Dye", ref apply) || bigChange)
|
||||
if (ImUtf8.Checkbox($"Apply {slot.ToName()} Dye", ref apply) || bigChange)
|
||||
_manager.ChangeApplyStains(_selector.Selected!, slot, apply);
|
||||
}
|
||||
else
|
||||
foreach (var slot in slots)
|
||||
{
|
||||
var apply = bigChange ? ((EquipFlag)flags).HasFlag(slot.ToFlag()) : _selector.Selected!.DoApplyEquip(slot);
|
||||
if (ImGui.Checkbox($"Apply {slot.ToName()}", ref apply) || bigChange)
|
||||
if (ImUtf8.Checkbox($"Apply {slot.ToName()}", ref apply) || bigChange)
|
||||
_manager.ChangeApplyItem(_selector.Selected!, slot, apply);
|
||||
}
|
||||
}
|
||||
|
|
@ -311,16 +302,7 @@ public class DesignPanel
|
|||
EquipSlotExtensions.FullSlots);
|
||||
|
||||
ImUtf8.IconDummy();
|
||||
if (_config.UseAdvancedParameters)
|
||||
{
|
||||
DrawParameterApplication();
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawMetaApplication();
|
||||
ImUtf8.IconDummy();
|
||||
DrawBonusSlotApplication();
|
||||
}
|
||||
DrawParameterApplication();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -334,7 +316,7 @@ public class DesignPanel
|
|||
|
||||
private void DrawMetaApplication()
|
||||
{
|
||||
using var id = ImRaii.PushId("Meta");
|
||||
using var id = ImUtf8.PushId("Meta");
|
||||
const uint all = (uint)MetaExtensions.All;
|
||||
var flags = (uint)_selector.Selected!.Application.Meta;
|
||||
var bigChange = ImGui.CheckboxFlags("Apply All Meta Changes", ref flags, all);
|
||||
|
|
@ -342,7 +324,7 @@ public class DesignPanel
|
|||
foreach (var (index, label) in MetaExtensions.AllRelevant.Zip(MetaLabels))
|
||||
{
|
||||
var apply = bigChange ? ((MetaFlag)flags).HasFlag(index.ToFlag()) : _selector.Selected!.DoApplyMeta(index);
|
||||
if (ImGui.Checkbox(label, ref apply) || bigChange)
|
||||
if (ImUtf8.Checkbox(label, ref apply) || bigChange)
|
||||
_manager.ChangeApplyMeta(_selector.Selected!, index, apply);
|
||||
}
|
||||
}
|
||||
|
|
@ -368,20 +350,20 @@ public class DesignPanel
|
|||
|
||||
private void DrawParameterApplication()
|
||||
{
|
||||
using var id = ImRaii.PushId("Parameter");
|
||||
using var id = ImUtf8.PushId("Parameter");
|
||||
var flags = (uint)_selector.Selected!.Application.Parameters;
|
||||
var bigChange = ImGui.CheckboxFlags("Apply All Customize Parameters", ref flags, (uint)CustomizeParameterExtensions.All);
|
||||
foreach (var flag in CustomizeParameterExtensions.AllFlags)
|
||||
{
|
||||
var apply = bigChange ? ((CustomizeParameterFlag)flags).HasFlag(flag) : _selector.Selected!.DoApplyParameter(flag);
|
||||
if (ImGui.Checkbox($"Apply {flag.ToName()}", ref apply) || bigChange)
|
||||
if (ImUtf8.Checkbox($"Apply {flag.ToName()}", ref apply) || bigChange)
|
||||
_manager.ChangeApplyParameter(_selector.Selected!, flag, apply);
|
||||
}
|
||||
}
|
||||
|
||||
public void Draw()
|
||||
{
|
||||
using var group = ImRaii.Group();
|
||||
using var group = ImUtf8.Group();
|
||||
if (_selector.SelectedPaths.Count > 1)
|
||||
{
|
||||
_multiDesignPanel.Draw();
|
||||
|
|
@ -419,10 +401,12 @@ public class DesignPanel
|
|||
using var table = ImUtf8.Table("##Panel", 1, ImGuiTableFlags.BordersOuter | ImGuiTableFlags.ScrollY, ImGui.GetContentRegionAvail());
|
||||
if (!table || _selector.Selected == null)
|
||||
return;
|
||||
|
||||
ImGui.TableSetupScrollFreeze(0, 1);
|
||||
ImGui.TableNextColumn();
|
||||
if (_selector.Selected == null)
|
||||
return;
|
||||
|
||||
ImGui.Dummy(Vector2.Zero);
|
||||
DrawButtonRow();
|
||||
ImGui.TableNextColumn();
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ public class SettingsTab(
|
|||
IKeyState keys,
|
||||
DesignColorUi designColorUi,
|
||||
PaletteImport paletteImport,
|
||||
PalettePlusChecker paletteChecker,
|
||||
CollectionOverrideDrawer overrides,
|
||||
CodeDrawer codeDrawer,
|
||||
Glamourer glamourer,
|
||||
|
|
@ -93,20 +92,15 @@ public class SettingsTab(
|
|||
Checkbox("Revert Manual Changes on Zone Change"u8,
|
||||
"Restores the old behaviour of reverting your character to its game or automation base whenever you change the zone."u8,
|
||||
config.RevertManualChangesOnZoneChange, v => config.RevertManualChangesOnZoneChange = v);
|
||||
Checkbox("Enable Advanced Customization Options"u8,
|
||||
"Enable the display and editing of advanced customization options like arbitrary colors."u8,
|
||||
config.UseAdvancedParameters, paletteChecker.SetAdvancedParameters);
|
||||
PaletteImportButton();
|
||||
Checkbox("Enable Advanced Dye Options"u8,
|
||||
"Enable the display and editing of advanced dyes (color sets) for all equipment"u8,
|
||||
config.UseAdvancedDyes, v => config.UseAdvancedDyes = v);
|
||||
Checkbox("Always Apply Associated Mods"u8,
|
||||
"Whenever a design is applied to a character (including via automation), Glamourer will try to apply its associated mod settings to the collection currently associated with that character, if it is available.\n\n"u8
|
||||
+ "Glamourer will NOT revert these applied settings automatically. This may mess up your collection and configuration.\n\n"u8
|
||||
+ "If you enable this setting, you are aware that any resulting misconfiguration is your own fault."u8,
|
||||
config.AlwaysApplyAssociatedMods, v => config.AlwaysApplyAssociatedMods = v);
|
||||
Checkbox("Use Temporary Mod Settings"u8,
|
||||
"Apply all settings as temporary settings so they will be reset when Glamourer or the game shut down."u8, config.UseTemporarySettings,
|
||||
"Apply all settings as temporary settings so they will be reset when Glamourer or the game shut down."u8,
|
||||
config.UseTemporarySettings,
|
||||
v => config.UseTemporarySettings = v);
|
||||
ImGui.NewLine();
|
||||
}
|
||||
|
|
@ -152,7 +146,7 @@ public class SettingsTab(
|
|||
ImGui.Dummy(Vector2.Zero);
|
||||
|
||||
Checkbox("Enable Game Context Menus"u8, "Whether to show a Try On via Glamourer button on context menus for equippable items."u8,
|
||||
config.EnableGameContextMenu, v =>
|
||||
config.EnableGameContextMenu, v =>
|
||||
{
|
||||
config.EnableGameContextMenu = v;
|
||||
if (v)
|
||||
|
|
@ -161,12 +155,13 @@ public class SettingsTab(
|
|||
contextMenuService.Disable();
|
||||
});
|
||||
Checkbox("Show Window when UI is Hidden"u8, "Whether to show Glamourer windows even when the games UI is hidden."u8,
|
||||
config.ShowWindowWhenUiHidden, v =>
|
||||
config.ShowWindowWhenUiHidden, v =>
|
||||
{
|
||||
config.ShowWindowWhenUiHidden = v;
|
||||
uiBuilder.DisableUserUiHide = v;
|
||||
});
|
||||
Checkbox("Hide Window in Cutscenes"u8, "Whether the main Glamourer window should automatically be hidden when entering cutscenes or not."u8,
|
||||
Checkbox("Hide Window in Cutscenes"u8,
|
||||
"Whether the main Glamourer window should automatically be hidden when entering cutscenes or not."u8,
|
||||
config.HideWindowInCutscene,
|
||||
v =>
|
||||
{
|
||||
|
|
@ -177,13 +172,13 @@ public class SettingsTab(
|
|||
config.Ephemeral.LockMainWindow,
|
||||
v => config.Ephemeral.LockMainWindow = v);
|
||||
Checkbox("Open Main Window at Game Start"u8, "Whether the main Glamourer window should be open or closed after launching the game."u8,
|
||||
config.OpenWindowAtStart, v => config.OpenWindowAtStart = v);
|
||||
config.OpenWindowAtStart, v => config.OpenWindowAtStart = v);
|
||||
ImGui.Dummy(Vector2.Zero);
|
||||
ImGui.Separator();
|
||||
ImGui.Dummy(Vector2.Zero);
|
||||
|
||||
Checkbox("Smaller Equip Display"u8, "Use single-line display without icons and small dye buttons instead of double-line display."u8,
|
||||
config.SmallEquip, v => config.SmallEquip = v);
|
||||
config.SmallEquip, v => config.SmallEquip = v);
|
||||
DrawHeightUnitSettings();
|
||||
Checkbox("Show Application Checkboxes"u8,
|
||||
"Show the application checkboxes in the Customization and Equipment panels of the design tab, instead of only showing them under Application Rules."u8,
|
||||
|
|
@ -211,23 +206,22 @@ public class SettingsTab(
|
|||
Checkbox("Show Unobtained Item Warnings"u8,
|
||||
"Show information whether you have unlocked all items and customizations in your automated design or not."u8,
|
||||
config.ShowUnlockedItemWarnings, v => config.ShowUnlockedItemWarnings = v);
|
||||
if (config.UseAdvancedParameters)
|
||||
Checkbox("Show Color Display Config"u8, "Show the Color Display configuration options in the Advanced Customization panels."u8,
|
||||
config.ShowColorConfig, v => config.ShowColorConfig = v);
|
||||
Checkbox("Show Palette+ Import Button"u8,
|
||||
"Show the import button that allows you to import Palette+ palettes onto a design in the Advanced Customization options section for designs."u8,
|
||||
config.ShowPalettePlusImport, v => config.ShowPalettePlusImport = v);
|
||||
using (ImRaii.PushId(1))
|
||||
{
|
||||
Checkbox("Show Color Display Config"u8, "Show the Color Display configuration options in the Advanced Customization panels."u8,
|
||||
config.ShowColorConfig, v => config.ShowColorConfig = v);
|
||||
Checkbox("Show Palette+ Import Button"u8,
|
||||
"Show the import button that allows you to import Palette+ palettes onto a design in the Advanced Customization options section for designs."u8,
|
||||
config.ShowPalettePlusImport, v => config.ShowPalettePlusImport = v);
|
||||
using var id = ImRaii.PushId(1);
|
||||
PaletteImportButton();
|
||||
}
|
||||
|
||||
if (config.UseAdvancedDyes)
|
||||
Checkbox("Keep Advanced Dye Window Attached"u8,
|
||||
"Keeps the advanced dye window expansion attached to the main window, or makes it freely movable."u8,
|
||||
config.KeepAdvancedDyesAttached, v => config.KeepAdvancedDyesAttached = v);
|
||||
Checkbox("Keep Advanced Dye Window Attached"u8,
|
||||
"Keeps the advanced dye window expansion attached to the main window, or makes it freely movable."u8,
|
||||
config.KeepAdvancedDyesAttached, v => config.KeepAdvancedDyesAttached = v);
|
||||
|
||||
Checkbox("Debug Mode"u8, "Show the debug tab. Only useful for debugging or advanced use. Not recommended in general."u8, config.DebugMode,
|
||||
Checkbox("Debug Mode"u8, "Show the debug tab. Only useful for debugging or advanced use. Not recommended in general."u8,
|
||||
config.DebugMode,
|
||||
v => config.DebugMode = v);
|
||||
ImGui.NewLine();
|
||||
}
|
||||
|
|
@ -235,8 +229,7 @@ public class SettingsTab(
|
|||
private void DrawQuickDesignBoxes()
|
||||
{
|
||||
var showAuto = config.EnableAutoDesigns;
|
||||
var showAdvanced = config.UseAdvancedParameters || config.UseAdvancedDyes;
|
||||
var numColumns = 8 - (showAuto ? 0 : 2) - (showAdvanced ? 0 : 1) - (config.UseTemporarySettings ? 0 : 1);
|
||||
var numColumns = 8 - (showAuto ? 0 : 2) - (config.UseTemporarySettings ? 0 : 1);
|
||||
ImGui.NewLine();
|
||||
ImUtf8.Text("Show the Following Buttons in the Quick Design Bar:"u8);
|
||||
ImGui.Dummy(Vector2.Zero);
|
||||
|
|
@ -253,11 +246,11 @@ public class SettingsTab(
|
|||
("Reapply Auto", showAuto, QdbButtons.ReapplyAutomation),
|
||||
("Revert Equip", true, QdbButtons.RevertEquip),
|
||||
("Revert Customize", true, QdbButtons.RevertCustomize),
|
||||
("Revert Advanced", showAdvanced, QdbButtons.RevertAdvanced),
|
||||
("Revert Advanced", true, QdbButtons.RevertAdvanced),
|
||||
("Reset Settings", config.UseTemporarySettings, QdbButtons.ResetSettings),
|
||||
];
|
||||
|
||||
for(var i = 0; i < columns.Length; ++i)
|
||||
for (var i = 0; i < columns.Length; ++i)
|
||||
{
|
||||
if (!columns[i].Item2)
|
||||
continue;
|
||||
|
|
@ -291,7 +284,7 @@ public class SettingsTab(
|
|||
|
||||
private void PaletteImportButton()
|
||||
{
|
||||
if (!config.UseAdvancedParameters || !config.ShowPalettePlusImport)
|
||||
if (!config.ShowPalettePlusImport)
|
||||
return;
|
||||
|
||||
ImGui.SameLine();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue