ComboBoxInputSetup
Package: Libraries.Interface.Behaviors.Controls · Inherits from: Libraries.Language.Object
The ComboBoxInputSetup class builds the input table of combo boxes, the "ComboBox" input group. It starts as a copy of the "TextField" table, so typing, the caret and the selection work as in a text field, and adds the combo box's keys: Down and Alt+Down open the list or highlight the next choice, Up opens it or highlights the previous choice, Home and End go to the first and last choice while the list is open, Enter and the keypad's Enter choose the highlighted choice, and Escape closes the list. DefaultInputSets:SetupComboBoxInput calls it when the game starts, so most users won't need to.
Example Code
use Libraries.Interface.Behaviors.Controls.ComboBoxInputSetup
use Libraries.Game.GameStateManager
use Libraries.Game.GameInput
GameStateManager manager
GameInput gameInput = manager:GetInput()
ComboBoxInputSetup setup
setup:Setup(gameInput)
Actions
Setup(Libraries.Game.GameInput gameInput)
This action builds the "ComboBox" input table and adds it to the game's input. The "TextField" table must already be set up, since the combo box's table starts as a copy of it.
Parameters
gameInputLibraries.Game.GameInput: The game's input, which gets the table.
Example
use Libraries.Interface.Behaviors.Controls.ComboBoxInputSetup
use Libraries.Game.GameStateManager
use Libraries.Game.GameInput
GameStateManager manager
GameInput gameInput = manager:GetInput()
ComboBoxInputSetup setup
setup:Setup(gameInput)