using System; namespace pkNX.WinForms; public enum EditorCategory { None, Pokemon, AI, Battle, Field, Shops, Items, Dialog, NPC, Player, Rides, Graphics, Audio, Misc, } [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] public class EditorCallableAttribute : Attribute { public EditorCategory Category { get; set; } public string EditorName { get; set; } /// /// Add this attribute to customize the button that will be displayed in the main editor /// /// The category of this editor. Add this to hide it under a sub editor button /// The name that should be displayed on the editor button. Leave empty for automatic conversion from the method name. public EditorCallableAttribute(EditorCategory category = EditorCategory.Misc, string editorName = "") { Category = category; EditorName = editorName; } public bool HasCustomEditorName() { return !string.IsNullOrWhiteSpace(EditorName); } public bool HasCategory() { return Category != EditorCategory.None; } }