Namespace: | Sirenix.OdinInspector.Editor |
Assembly: | Sirenix.OdinInspector.Editor |
public class OdinMenuItem
public OdinMenuItem(OdinMenuTree tree, string name, object value)
OdinMenuTree | tree | The Odin menu tree instance the menu item belongs to. |
System.String | name | The name of the menu item. |
System.Object | value | The instance the value item represents. |
public bool DefaultToggledState
public bool MenuItemIsBeingRendered
public Action<OdinMenuItem> OnDrawItem
public Action<OdinMenuItem> OnRightClick
public SdfIconType SdfIcon
public Color? SdfIconColor
public virtual List<OdinMenuItem> ChildMenuItems { get; }
public int FlatTreeIndex { get; }
public Texture Icon { get; set; }
public Func<Texture> IconGetter { get; set; }
public Texture IconSelected { get; set; }
public bool IsEnabled { get; set; }
public bool IsSelectable { get; set; }
public bool IsSelected { get; }
public Rect LabelRect { get; }
public OdinMenuTree MenuTree { get; }
public string Name { get; set; }
public OdinMenuItem NextSelectableMenuItem { get; }
public OdinMenuItem NextVisualMenuItem { get; }
public OdinMenuItem Parent { get; }
public OdinMenuItem PrevSelectableMenuItem { get; }
public OdinMenuItem PrevVisualMenuItem { get; }
public Rect Rect { get; }
public string SearchString { get; set; }
public virtual string SmartName { get; }
public OdinMenuStyle Style { get; set; }
public virtual bool Toggled { get; set; }
public object Value { get; set; }
public bool Deselect()
System.Boolean |
public virtual void DrawMenuItem(int indentLevel)
System.Int32 | indentLevel |
public virtual void DrawMenuItems(int indentLevel)
System.Int32 | indentLevel | The indent level. |
public IEnumerable<OdinMenuItem> GetChildMenuItemsRecursive(bool includeSelf)
System.Boolean | includeSelf | Whether to include it self in the collection. |
System.Collections.Generic.IEnumerable<OdinMenuItem> |
public string GetFullPath()
System.String |
public IEnumerable<OdinMenuItem> GetParentMenuItemsRecursive(bool includeSelf, bool includeRoot = false)
System.Boolean | includeSelf | Whether to include it self in the collection. |
System.Boolean | includeRoot | Whether to include the root. |
System.Collections.Generic.IEnumerable<OdinMenuItem> |
protected void HandleMouseEvents(Rect rect, Rect triangleRect)
UnityEngine.Rect | rect | The rect. |
UnityEngine.Rect | triangleRect | The triangle rect. |
protected virtual void OnDrawMenuItem(Rect rect, Rect labelRect)
UnityEngine.Rect | rect | |
UnityEngine.Rect | labelRect |
public void Remove()
public void Select(bool addToSelection = false)
System.Boolean | addToSelection |