2023-12-08 19:09:50 +00:00
|
|
|
using Godot;
|
|
|
|
|
|
|
|
namespace App.scenes;
|
|
|
|
|
|
|
|
public partial class BtnIcon : Control
|
|
|
|
{
|
|
|
|
[Export]
|
|
|
|
[ExportGroup("Data")]
|
|
|
|
public string Text { get; set; } = string.Empty;
|
2023-12-08 19:16:39 +00:00
|
|
|
|
|
|
|
[Export]
|
|
|
|
[ExportGroup("Data")]
|
2023-12-08 19:22:04 +00:00
|
|
|
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
|
2023-12-08 19:09:50 +00:00
|
|
|
}
|