Class MenuItem
- Namespace
- Fantas
- Assembly
- Fantas.dll
Menu Item information
public sealed class MenuItem
- Inheritance
-
MenuItem
- Inherited Members
Constructors
MenuItem(string, Texture)
Creates a noninteractive text menu item.
public MenuItem(string label, Texture icon)
Parameters
MenuItem(string, Texture, MenuItem[])
public MenuItem(string label, Texture icon, MenuItem[] subItems)
Parameters
MenuItem(string, Texture, Action)
public MenuItem(string label, Texture icon, Action menuAction)
Parameters
MenuItem(string, Texture, bool)
Creates a toggle switch menu item.
public MenuItem(string label, Texture icon, bool isOn)
Parameters
MenuItem(string, Texture, float, float, float)
Creates a slider menu item.
public MenuItem(string label, Texture icon, float minimum, float maximum, float value)
Parameters
Properties
Color
Menu label
public Color Color { get; set; }
Property Value
Icon
Menu icon
public Texture Icon { get; }
Property Value
IsOn
Current toggle state.
public bool IsOn { get; set; }
Property Value
Label
Menu label
public string Label { get; }
Property Value
Maximum
Maximum slider value.
public float Maximum { get; set; }
Property Value
MenuAction
Menu Action
public Action MenuAction { get; }
Property Value
Minimum
Minimum slider value.
public float Minimum { get; set; }
Property Value
SubItems
Menu sub items
public MenuItem[] SubItems { get; }
Property Value
- MenuItem[]
Type
Menu item behavior and presentation.
public MenuItemType Type { get; }
Property Value
Value
Current slider value.
public float Value { get; set; }
Property Value
Events
ValueChanged
Raised when a toggle or slider value changes.
public event EventHandler<MenuItemValueChangedEventArgs> ValueChanged