Navigatable menu HUD item. A very limited menu system. Panel displays for all users (due to HUD limitations) but is navigated by a single person. Right-click to fly through menu options, and left click to select a menu item. Options are key-function pairs. When the user selects an option, the menu is closed and the function associated with the option is called. See the API for example usage.
More...
Navigatable menu HUD item. A very limited menu system. Panel displays for all users (due to HUD limitations) but is navigated by a single person. Right-click to fly through menu options, and left click to select a menu item. Options are key-function pairs. When the user selects an option, the menu is closed and the function associated with the option is called. See the API for example usage.
VSLib.HUD.Menu.Menu |
( |
string |
formatStr = "[ {name} ]\n\n{title}\n\n{options}" , |
|
|
string |
title = "Menu" , |
|
|
string |
optionFormatStr = "{num}. {option}" , |
|
|
string |
highlightStrPre = "[ " , |
|
|
string |
highlightStrPost = " ]" |
|
) |
| |
|
private |
void VSLib.HUD.Menu.AddOption |
( |
string |
option, |
|
|
function |
func |
|
) |
| |
|
private |
Associates a menu item with a function
void VSLib.HUD.Menu.CloseMenu |
( |
| ) |
|
|
private |
void VSLib.HUD.Menu.Detach |
( |
| ) |
|
|
private |
Stops and detaches the HUD object.
void VSLib.HUD.Menu.DisplayMenu |
( |
Player |
player, |
|
|
int |
attachTo, |
|
|
bool |
autoDetach = false |
|
) |
| |
|
private |
Displays the menu and hands over control to a particular player entity.
string VSLib.HUD.Menu.GetString |
( |
| ) |
|
|
private |
Returns the full formatted menu text
void VSLib.HUD.Menu.OverrideButtons |
( |
int |
selectBtn, |
|
|
int |
switchBtn |
|
) |
| |
|
private |
Overrides the buttons used to detect HUD changes. You can pass in BUTTON_ATTACK and BUTTON_SHOVE for example.
void VSLib.HUD.Menu.ResizeHeightByLines |
( |
| ) |
|
|
private |
Resizes this HUD item's height depending on the line height.
void VSLib.HUD.Menu.SetHighlightStrings |
( |
string |
highlightStrPre, |
|
|
string |
highlightStrPost |
|
) |
| |
|
private |
Sets new highlight strings
void VSLib.HUD.Menu.SetOptionFormat |
( |
string |
optionFormatStr | ) |
|
|
private |
void VSLib.HUD.Menu.SetTitle |
( |
string |
title | ) |
|
|
private |
void VSLib.HUD.Menu.Tick |
( |
| ) |
|
|
private |
Gathers input data and acts on it.
The documentation for this class was generated from the following file: