Add toggle for the Changed Item category filter.

This commit is contained in:
Ottermandias 2023-07-07 00:45:56 +02:00
parent 0521cf0d18
commit 2bc7eb165e
4 changed files with 18 additions and 7 deletions

View file

@ -48,6 +48,7 @@ public class Configuration : IPluginConfiguration, ISavable
public bool UseCharacterCollectionInTryOn { get; set; } = true;
public bool UseOwnerNameForCharacterCollection { get; set; } = true;
public bool UseNoModsInInspect { get; set; } = false;
public bool HideChangedItemFilters { get; set; } = false;
public bool HideRedrawBar { get; set; } = false;
public int OptionGroupCollapsibleMin { get; set; } = 5;

View file

@ -183,7 +183,7 @@ public class ModDataEditor
}
catch (Exception e)
{
Penumbra.Log.Error($"Could not load mod meta:\n{e}");
Penumbra.Log.Error($"Could not load mod meta for {metaFile}:\n{e}");
return ModDataChangeType.Deletion;
}
}

View file

@ -141,6 +141,9 @@ public class ChangedItemDrawer : IDisposable
/// <summary> Draw a header line with the different icon types to filter them. </summary>
public void DrawTypeFilter()
{
if (_config.HideChangedItemFilters)
return;
using var _ = ImRaii.PushId("ChangedItemIconFilter");
var size = new Vector2(2 * ImGui.GetTextLineHeight());
using var style = ImRaii.PushStyle(ImGuiStyleVar.ItemSpacing, Vector2.Zero);

View file

@ -7,7 +7,7 @@ using Dalamud.Interface.Components;
using Dalamud.Utility;
using ImGuiNET;
using OtterGui;
using OtterGui.Custom;
using OtterGui.Custom;
using OtterGui.Raii;
using OtterGui.Widgets;
using Penumbra.Api;
@ -372,6 +372,13 @@ public class SettingsTab : ITab
_config.PrintSuccessfulCommandsToChat, v => _config.PrintSuccessfulCommandsToChat = v);
Checkbox("Hide Redraw Bar in Mod Panel", "Hides the lower redraw buttons in the mod panel in your Mods tab.",
_config.HideRedrawBar, v => _config.HideRedrawBar = v);
Checkbox("Hide Changed Item Filters", "Hides the category filter line in the Changed Items tab and the Changed Items mod panel.",
_config.HideChangedItemFilters, v =>
{
_config.HideChangedItemFilters = v;
if (v)
_config.ChangedItemFilter = ChangedItemDrawer.AllFlags;
});
DrawSingleSelectRadioMax();
DrawCollapsibleGroupMin();
}
@ -687,17 +694,17 @@ public class SettingsTab : ITab
$"Reset minimum dimensions to ({Configuration.Constants.MinimumSizeX}, {Configuration.Constants.MinimumSizeY}).",
x == Configuration.Constants.MinimumSizeX && y == Configuration.Constants.MinimumSizeY))
{
x = Configuration.Constants.MinimumSizeX;
y = Configuration.Constants.MinimumSizeY;
edited = true;
x = Configuration.Constants.MinimumSizeX;
y = Configuration.Constants.MinimumSizeY;
edited = true;
}
ImGuiUtil.LabeledHelpMarker("Minimum Window Dimensions",
"Set the minimum dimensions for resizing this window. Reducing these dimensions may cause the window to look bad or more confusing and is not recommended.");
"Set the minimum dimensions for resizing this window. Reducing these dimensions may cause the window to look bad or more confusing and is not recommended.");
if (warning.Length > 0)
ImGuiUtil.DrawTextButton(warning, UiHelpers.InputTextWidth, Colors.PressEnterWarningBg);
else
else
ImGui.NewLine();
if (!edited)