Skip to content

Commit 832bd61

Browse files
committed
Make the mass-descendant buttons require misclick protection, update luna.
1 parent 0772802 commit 832bd61

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

Luna

Penumbra/UI/ModsTab/Selector/Buttons/EnableDescendantsButton.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,21 @@ public sealed class SetDescendantsButton(ModFileSystemDrawer drawer, bool setTo,
1717
(null, false) => "Disable Descendants"u8,
1818
});
1919

20+
/// <inheritdoc/>
21+
public override bool Enabled(in IFileSystemFolder data)
22+
=> LunaStyle.Modifier.Misclick.Active;
23+
24+
/// <inheritdoc/>
25+
public override bool HasTooltip
26+
=> true;
27+
28+
public override void DrawTooltip(in IFileSystemFolder data)
29+
{
30+
Im.Text("Perform a bulk action on all mods that are inside this folder or its subfolders."u8);
31+
if (!LunaStyle.Modifier.Misclick.Active)
32+
Im.Text($"Hold {LunaStyle.Modifier.Misclick} while clicking to execute.");
33+
}
34+
2035
/// <inheritdoc/>
2136
public override ReadOnlySpan<byte> Label(in IFileSystemFolder folder)
2237
=> _label;

0 commit comments

Comments
 (0)