mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-30 12:23:42 +01:00
.
This commit is contained in:
parent
c505286220
commit
5e410d8786
9 changed files with 148 additions and 54 deletions
|
|
@ -3,9 +3,11 @@ using Dalamud.Game.ClientState.Keys;
|
|||
using Dalamud.Interface;
|
||||
using Glamourer.Designs;
|
||||
using Glamourer.Events;
|
||||
using ImGuiNET;
|
||||
using OtterGui;
|
||||
using OtterGui.Filesystem;
|
||||
using OtterGui.FileSystem.Selector;
|
||||
using OtterGui.Raii;
|
||||
|
||||
namespace Glamourer.Gui.Tabs.DesignTab;
|
||||
|
||||
|
|
@ -15,6 +17,16 @@ public sealed class DesignFileSystemSelector : FileSystemSelector<Design, Design
|
|||
private readonly DesignChanged _event;
|
||||
private readonly Configuration _config;
|
||||
|
||||
public bool IncognitoMode
|
||||
{
|
||||
get => _config.IncognitoMode;
|
||||
set
|
||||
{
|
||||
_config.IncognitoMode = value;
|
||||
_config.Save();
|
||||
}
|
||||
}
|
||||
|
||||
public struct DesignState
|
||||
{ }
|
||||
|
||||
|
|
@ -29,6 +41,13 @@ public sealed class DesignFileSystemSelector : FileSystemSelector<Design, Design
|
|||
AddButton(DeleteButton, 1000);
|
||||
}
|
||||
|
||||
protected override void DrawLeafName(FileSystem<Design>.Leaf leaf, in DesignState state, bool selected)
|
||||
{
|
||||
var flag = selected ? ImGuiTreeNodeFlags.Selected | LeafFlags : LeafFlags;
|
||||
var name = IncognitoMode ? leaf.Value.Incognito : leaf.Name;
|
||||
using var _ = ImRaii.TreeNode(name, flag);
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
base.Dispose();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue