MenuInfo

Namespace: Murder.Core.Input
Assembly: Murder.dll

public sealed struct MenuInfo

⭐ Constructors

public MenuInfo()
public MenuInfo(MenuOption[] options)

Parameters
options MenuOption[]

public MenuInfo(IEnumerable<T> options)

Parameters
options IEnumerable<T>

public MenuInfo(int size)

Parameters
size int

public MenuInfo(String[] options)

Parameters
options string[]

⭐ Properties

Canceled

public bool Canceled;

Returns
bool

Disabled

public bool Disabled;

Returns
bool

HasOptions

public bool HasOptions { get; }

Returns
bool

Icons

public Portrait[] Icons;

Optional icons to be displayed near the options.

Returns
Portrait[]

JustMoved

public bool JustMoved;

Returns
bool

LargestOptionText

public float LargestOptionText { get; }

Returns
float

LastMoved

public float LastMoved;

Returns
float

LastPressed

public float LastPressed;

Returns
float

Length

public int Length { get; }

Number of options in this menu

Returns
int

Options

public MenuOption[] Options;

Returns
MenuOption[]

Overflow

public int Overflow;

Returns
int

PreviousSelection

public int PreviousSelection;

Returns
int

Scroll

public int Scroll;

Returns
int

Selection

public int Selection { get; private set; }

Returns
int

Sounds

public MenuSounds Sounds;

Returns
MenuSounds

VisibleItems

public int VisibleItems;

Number of visible options on the screen, 8 is the default.

Returns
int

⭐ Methods

IsOptionAvailable(int)

public bool IsOptionAvailable(int option)

Parameters
option int

Returns
bool

NextAvailableOption(int, int)

public int NextAvailableOption(int option, int direction)

Parameters
option int

direction int

Returns
int

Disable(bool)

public MenuInfo Disable(bool disabled)

Parameters
disabled bool

Returns
MenuInfo

GetOptionText(int)

public string GetOptionText(int index)

Parameters
index int

Returns
string

GetSelectedOptionText()

public string GetSelectedOptionText()

Returns
string

Cancel()

public void Cancel()

Clamp(int)

public void Clamp(int max)

Parameters
max int

Press(float)

public void Press(float now)

Parameters
now float

Reset()

public void Reset()

Resets the menu info selector to the first available option.

Resize(int)

public void Resize(int size)

Parameters
size int

Select(int, float)

public void Select(int index, float now)

Parameters
index int
now float

Select(int)

public void Select(int index)

Parameters
index int

SnapLeft(int)

public void SnapLeft(int width)

Parameters
width int

SnapRight(int)

public void SnapRight(int width)

Parameters
width int