Table of Contents

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

label string
icon Texture

MenuItem(string, Texture, MenuItem[])

public MenuItem(string label, Texture icon, MenuItem[] subItems)

Parameters

label string
icon Texture
subItems MenuItem[]

MenuItem(string, Texture, Action)

public MenuItem(string label, Texture icon, Action menuAction)

Parameters

label string
icon Texture
menuAction Action

MenuItem(string, Texture, bool)

Creates a toggle switch menu item.

public MenuItem(string label, Texture icon, bool isOn)

Parameters

label string
icon Texture
isOn bool

MenuItem(string, Texture, float, float, float)

Creates a slider menu item.

public MenuItem(string label, Texture icon, float minimum, float maximum, float value)

Parameters

label string
icon Texture
minimum float
maximum float
value float

Properties

Color

Menu label

public Color Color { get; set; }

Property Value

Color

Icon

Menu icon

public Texture Icon { get; }

Property Value

Texture

IsOn

Current toggle state.

public bool IsOn { get; set; }

Property Value

bool

Label

Menu label

public string Label { get; }

Property Value

string

Maximum

Maximum slider value.

public float Maximum { get; set; }

Property Value

float

MenuAction

Menu Action

public Action MenuAction { get; }

Property Value

Action

Minimum

Minimum slider value.

public float Minimum { get; set; }

Property Value

float

SubItems

Menu sub items

public MenuItem[] SubItems { get; }

Property Value

MenuItem[]

Type

Menu item behavior and presentation.

public MenuItemType Type { get; }

Property Value

MenuItemType

Value

Current slider value.

public float Value { get; set; }

Property Value

float

Events

ValueChanged

Raised when a toggle or slider value changes.

public event EventHandler<MenuItemValueChangedEventArgs> ValueChanged

Event Type

EventHandler<MenuItemValueChangedEventArgs>