Initial commit: AetherBags + KamiToolKit for FC Gitea
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user