Difference between revisions of "UI.SimpleMenu"

From Nomad DB
Line 3: Line 3:
 
Creates a ''SimpleMenu'', an ingame menu which can be controlled by the arrow keys & numpad keys. The name comes from its (currently) limited functionality and aims to provide very basic, but useful menu functionality.
 
Creates a ''SimpleMenu'', an ingame menu which can be controlled by the arrow keys & numpad keys. The name comes from its (currently) limited functionality and aims to provide very basic, but useful menu functionality.
  
This function has to be called from inside a [[WD2 ScriptHook: Script|Script]].
+
This function has to be called from inside a [[WD2 ScriptHook: Script|Script]]. If you wish to handle Text input from users, use [[UI.SimpleTextInput]].
  
 
==Syntax==
 
==Syntax==

Revision as of 22:06, 2 August 2020

SimpleMenu from Trainer

Creates a SimpleMenu, an ingame menu which can be controlled by the arrow keys & numpad keys. The name comes from its (currently) limited functionality and aims to provide very basic, but useful menu functionality.

This function has to be called from inside a Script. If you wish to handle Text input from users, use UI.SimpleTextInput.

Syntax

UI.SimpleMenu()
  • Returns UISimpleMenu instance

Remarks

The Menu will be invisible until a call to UISimpleMenu:Activate or UISimpleMenu:Toggle. You can easily bind a Menu to a Key, see UISimpleMenu:Toggle for more information.

Entry and Entry Index

Every item inside the SimpleMenu is called Entry. There are different types of Entry (Button, Checkbox, Search, etc.). Every entry that is added to a SimpleMenu receives an "index" which can be used to modify it.

Methods

Menu State

Entries

Button
Checkbox

Events

Controls

Up/Down Arrows Navigation
Numpad 8(Up), Numpad 9 (Down)
Enter Confirm Option
Numpad 5
Delete Key, Numpad 0 Return back to previous menu
ESC Close the menu

Related Pages