// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved. using System; namespace FlaxEngine { /// /// Displays the method in the properties panel where user can click and invoke this method. /// /// Supported on both static and member methods that are parameterless. [AttributeUsage(AttributeTargets.Method)] public sealed class ButtonAttribute : Attribute { /// /// The button text. Empty value will use method name (auto-formatted). /// public string Text; /// /// The button tooltip text. Empty value will use method documentation. /// public string Tooltip; /// /// Initializes a new instance of the class. /// public ButtonAttribute() { } /// /// Initializes a new instance of the class. /// /// The button text. /// The button tooltip. public ButtonAttribute(string text, string tooltip = null) { Text = text; Tooltip = tooltip; } } }