C# Class OpenBve.Menu

Implements the in-game menu system; manages addition and removal of individual menus.
Mostrar archivo Open project: leezer3/OpenBVE

Private Properties

Property Type Description
Draw void
Init void
Menu OpenBveApi.Colors
PositionMenu void
ProcessCommand void
ProcessMouseDown bool
ProcessMouseMove bool
Reset void
SetControlJoyCustomData void
SetControlKbdCustomData void

Public Methods

Method Description
IsCustomizingControl ( ) : bool

Whether we are currently customising a control (Used for key/ joystick capture)

PopMenu ( ) : void

Pops the previous menu in the menu stack

PushMenu ( MenuType type, int data ) : void

Pushes a menu into the menu stack

Private Methods

Method Description
Draw ( ) : void

Draws the current menu as a screen overlay

Init ( ) : void
Menu ( ) : OpenBveApi.Colors
PositionMenu ( ) : void

Computes the position in the screen of the current menu. Also sets the menu size

ProcessCommand ( Interface cmd, double timeElapsed ) : void

Processes a user command for the current menu

ProcessMouseDown ( MouseButton button, int x, int y ) : bool

Processes a mouse down event

ProcessMouseMove ( int x, int y ) : bool

Processes a mouse move event

Reset ( ) : void
SetControlJoyCustomData ( int device, Interface component, int element, int dir ) : void
SetControlKbdCustomData ( Key key, Interface keybMod ) : void

Method Details

IsCustomizingControl() public method

Whether we are currently customising a control (Used for key/ joystick capture)
public IsCustomizingControl ( ) : bool
return bool

PopMenu() public method

Pops the previous menu in the menu stack
public PopMenu ( ) : void
return void

PushMenu() public method

Pushes a menu into the menu stack
public PushMenu ( MenuType type, int data ) : void
type MenuType The type of menu to push
data int The index of the menu in the menu stack (If pushing an existing higher level menu)
return void