Add: support LabelText for Button in generic class too

This commit is contained in:
Vladislav 2024-04-15 21:50:22 +03:00
parent 33697c1a69
commit fc33a6c261

View File

@ -23,6 +23,9 @@ namespace Alchemy.Editor.Elements
if (methodInfo.HasCustomAttribute<ButtonAttribute>())
{
var button = new MethodButton(target, methodInfo);
if (methodInfo.TryGetCustomAttribute(out LabelTextAttribute labelText)) {
button.SetLableText(labelText.Text);
}
Add(button);
}
return;