Menus
Built-in, configurable menu that uses keyboard inputs.
Last updated
Built-in, configurable menu that uses keyboard inputs.
Last updated
CreateMenu(entries, title, closeCB)
Creates and returns menu
object.
entries* (table) - Table of menu entries (see for structure)
title (string) - Visible title of the menu
closeCB (function) - Function which is called once the menu is closed
* = required arguments
Example:
menu.open()
Opens a previously created menu. Takes no parameters.
menu.close()
Closes a previously created menu. Takes no parameters.
menu.visible(text, visible)
Changes the visibility of one menu line that matches the specified text
text* (string) - The text of the menu line to change visibility of
visible* (boolean) - The visibility of the text
* = required argument
The whole table represents the whole menu with each entry in the table being a new line in the in-game menu.
Each entry in the Menu Entries Table
list represents an option in the table. Each option can be navigated using the left and right arrow keys. Each entry is an entry which has the following keys:
text* (string)
func (function)
* = required entry
Reference: utils/cl_menu.lua
See example use of Menu Entries Table
above under the method.