Added behavior

This commit is contained in:
Thorsten Sommer 2023-12-08 20:22:04 +01:00
parent 9295b6f5ec
commit 08b318b93b
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -10,5 +10,18 @@ public partial class BtnIcon : Control
[Export]
[ExportGroup("Data")]
public Texture Icon { get; set; }
public Texture2D Icon { get; set; }
#region Overrides of Node
public override void _Ready()
{
var button = this.GetNode<Button>("%btn");
button.Text = this.Text;
button.Icon = this.Icon;
base._Ready();
}
#endregion
}