|
Bitfighter
021
The Bitfighter Lua Documentation - Robots, Levelgens, and Plugins
|
Menu item for entering a floating value, with increment and decrement controls.
Member Functions | |
| FloatCounterMenuItem(name, startingVal, step, minVal, maxVal, decimalPlaces, units, minText, help) | |
| Constructor. | |
Menu item for entering a floating value, with increment and decrement controls.
| Arg types: name: string, startingVal: num, step: num, minVal: num, maxVal: num, decimalPlaces: num, units: string, minText: string, help: string | returns FloatCounterMenuItem |
Constructor.
Example:
| name | The text shown on the menu item. |
| startingVal | The starting value of the menu item. |
| step | The amount by which to increase or decrease the value when the arrow keys are used. |
| minVal | The minimum allowable value that can be entered. |
| maxVal | The maximum allowable value that can be entered. |
| decimalPlaces | The number of decimal places of accuracy to use. |
| units | The units to be shown alongside the numeric item. Pass "" if you don't want to display units. |
| minText | The text shown on the menu item when the minimum value has been reached. Pass "" to simply display the minimum value. |
| help | A bit of help text. |
The MenuItem will return the value entered.
For example: