Files
AetherBags/KamiToolKit/Nodes/Component/TextureButtonNode.cs
T
KnackAtNite 8db4ce6094
Debug Build and Test / Build against Latest Dalamud (push) Has been cancelled
Debug Build and Test / Build against Staging Dalamud (push) Has been cancelled
Initial commit: AetherBags + KamiToolKit for FC Gitea
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 14:46:31 -05:00

45 lines
1003 B
C#

using System.Numerics;
using KamiToolKit.Enums;
namespace KamiToolKit.Nodes;
public class TextureButtonNode : ButtonBase {
public readonly SimpleImageNode ImageNode;
public TextureButtonNode() {
ImageNode = new ImGuiImageNode {
WrapMode = WrapMode.Stretch,
};
ImageNode.AttachNode(this);
LoadTimelines();
InitializeComponentEvents();
}
public string TexturePath {
get => ImageNode.TexturePath;
set => ImageNode.TexturePath = value;
}
public Vector2 TextureCoordinates {
get => ImageNode.TextureCoordinates;
set => ImageNode.TextureCoordinates = value;
}
public Vector2 TextureSize {
get => ImageNode.TextureSize;
set => ImageNode.TextureSize = value;
}
protected override void OnSizeChanged() {
base.OnSizeChanged();
ImageNode.Size = Size;
}
private void LoadTimelines()
=> LoadTwoPartTimelines(this, ImageNode);
}