Bitfighter  021
The Bitfighter Lua Documentation - Robots, Levelgens, and Plugins
TextEntryMenuItem Class Reference

Menu item allowing users to enter a text value.

Inheritance diagram for TextEntryMenuItem:
MenuItem

Member Functions

TextEntryMenuItem(name, initial, empty, maxLength, help)
 Constructor.
 

Detailed Description

Menu item allowing users to enter a text value.

Constructor Documentation

◆ TextEntryMenuItem.new(name, initial, empty, maxLength, help)

Arg types: name: string, initial: string, empty: string, maxLength: int, help: string  |  returns TextEntryMenuItem

Constructor.

Example:

textentrymenuitem = TextEntryMenuItem.new(name, initial, empty, maxLength, help)
...
levelgen:addItem(textentrymenuitem)
Menu item allowing users to enter a text value.
Definition: UIMenuItems__cpp.h:35
Parameters
nameThe text shown on the menu item.
initialThe initial text in the menu item.
emptyThe text to display when the menu item is empty.
maxLengthThe maximum number of characters to allow (default: 32)
helpA bit of help text.

The MenuItem will return the text which the user entered.

For example:

m = TextEntryMenuItem.new("Player Name", "ChumpChange", "<no name entered>", 64, "The new player's name")