I18NCommander/I18N Commander/App/scenes/BtnIcon.cs

27 lines
494 B
C#
Raw Normal View History

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
}