27 lines
494 B
C#
27 lines
494 B
C#
using Godot;
|
|
|
|
namespace App.scenes;
|
|
|
|
public partial class BtnIcon : Control
|
|
{
|
|
[Export]
|
|
[ExportGroup("Data")]
|
|
public string Text { get; set; } = string.Empty;
|
|
|
|
[Export]
|
|
[ExportGroup("Data")]
|
|
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
|
|
} |