Initial commit: AetherBags + KamiToolKit for FC Gitea
Debug Build and Test / Build against Latest Dalamud (push) Has been cancelled
Debug Build and Test / Build against Staging Dalamud (push) Has been cancelled

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-08 14:46:31 -05:00
commit 8db4ce6094
375 changed files with 34124 additions and 0 deletions
@@ -0,0 +1,95 @@
using System;
using System.Numerics;
using FFXIVClientStructs.FFXIV.Component.GUI;
namespace KamiToolKit.Nodes;
public class SelectableNode : SimpleComponentNode {
private readonly NineGridNode hoveredBackgroundNode;
private readonly NineGridNode selectedBackgroundNode;
public SelectableNode() {
hoveredBackgroundNode = new SimpleNineGridNode {
TexturePath = "ui/uld/ListItemA.tex",
TextureCoordinates = new Vector2(0.0f, 22.0f),
TextureSize = new Vector2(64.0f, 22.0f),
TopOffset = 6,
BottomOffset = 6,
LeftOffset = 16,
RightOffset = 1,
IsVisible = false,
};
hoveredBackgroundNode.AttachNode(this);
selectedBackgroundNode = new SimpleNineGridNode {
TexturePath = "ui/uld/ListItemA.tex",
TextureCoordinates = new Vector2(0.0f, 0.0f),
TextureSize = new Vector2(64.0f, 22.0f),
TopOffset = 6,
BottomOffset = 6,
LeftOffset = 16,
RightOffset = 1,
IsVisible = false,
};
selectedBackgroundNode.AttachNode(this);
CollisionNode.AddEvent(AtkEventType.MouseOver, () => {
if (!IsSelected && EnableHighlight) {
IsHovered = true;
}
});
CollisionNode.AddEvent(AtkEventType.MouseDown, () => {
if (EnableSelection) {
IsSelected = true;
OnClick?.Invoke(this);
}
});
CollisionNode.AddEvent(AtkEventType.MouseOut, () => {
IsHovered = false;
});
}
protected override void OnSizeChanged() {
base.OnSizeChanged();
hoveredBackgroundNode.Size = Size + new Vector2(6.0f, 6.0f);
hoveredBackgroundNode.Position = new Vector2(-3.0f, -3.0f);
selectedBackgroundNode.Size = Size + new Vector2(6.0f, 6.0f);
selectedBackgroundNode.Position = new Vector2(-3.0f, -3.0f);
}
public Action<SelectableNode>? OnClick {
get;
set {
field = value;
CollisionNode.ShowClickableCursor = value is not null && EnableSelection;
}
}
public bool EnableSelection {
get;
set {
field = value;
CollisionNode.ShowClickableCursor = value;
}
} = true;
public bool EnableHighlight { get; set; } = true;
public bool IsHovered {
get => hoveredBackgroundNode.IsVisible;
set => hoveredBackgroundNode.IsVisible = value;
}
public bool IsSelected {
get => selectedBackgroundNode.IsVisible;
set {
selectedBackgroundNode.IsVisible = value;
if (value) {
hoveredBackgroundNode.IsVisible = false;
}
}
}
}