| Name | Type | Default | Description | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| x | number | The x coords | |||||||||||||||||||||||||||||||||
| y | number | The y coords | |||||||||||||||||||||||||||||||||
| w | number | The w coords | |||||||||||||||||||||||||||||||||
| h | number | The h coords | |||||||||||||||||||||||||||||||||
| listContents | Array.<Object> | List of all the contents to display | |||||||||||||||||||||||||||||||||
| opts | Object | {} | optional
                    
                    
                        
                    
                
                Options 
 | 
Properties:
| Name | Type | Description | 
|---|---|---|
| listContents | Array.<Object> | List of all the graphic contents to display | 
| listCallbacks | Array.<function()> | List of all the callback functions to excecute when pressed. | 
| orientation | OrientationWindow | The orientation of the window (horizontal or vertical) | 
| nbItemsMax | number | Max number of items to display on the choice box | 
| padding | Array.<number> | Padding of the box | 
| space | number | Space between each choice in the box | 
| currentSelectedIndex | number | The current selected index position in the choice box | 
| bordersInsideVisible | boolean | If checked, each choice will have an individual window box | 
| offsetSelectedIndex | number | offset index position when going out of the total box size | 
| choiceWidth | number | A choice box width | 
| choiceHeight | number | A choice box height | 
| startTime | number | A time variable used for delaying going up/down while keeping keyboard pressed | 
| size | number | Max number of choices according to max number + current number | 
| windowMain | WindowBox | The main window box when there is no border inside | 
| listWindows | Array.<WindowBox> | List of all the windows to display | 
Extends
Members
- 
    
    Number of milliseconds to wait before going up/down when keypress repeat- Default Value:
- 50
 
 
Methods
- 
    setX (x) overrides
- 
    
    
    Set the x valueName Type Description xnumber The x value 
- 
    setY (y) overrides
- 
    
    
    Set the y valueName Type Description ynumber The y value 
- 
    
    
    Get the content at a specific indexName Type Description inumber The index Returns:Type Description Object 
- 
    
    
    Get the current selected contentReturns:Type Description Object 
- 
    
    
    Update content size according to all the current settingsName Type Default Description currentSelectedIndexnumber 0 optional The current selected index position 
- 
    
    
    Set the content at a specific indexName Type Description inumber The index contentObject The new content 
- 
    
    
    Set all the graphic contentsName Type Description contentsArray.<Object> All the contents 
- 
    
    
    Set all the callbacks for each choiceName Type Description callbacksArray.<function()> All the callbacks functions 
- 
    
    
    Set all the contents and callbacksName Type Default Description contentsArray.<Object> All the contents callbacksArray.<function()> null optional All the callbacks functions currentSelectedIndexnumber 0 optional The current selected index position 
- 
    
    
    Unselect a choice
- 
    
    
    Select a choiceName Type Description inumber The index of the choice 
- 
    
    
    Select the current choice
- 
    
    
    Go cursor up
- 
    
    
    Go cursor down
- 
    
    
    First key press handleName Type Description keynumber The key ID pressed baseObject The base object to apply with callback 
- 
    
    
    Key pressed repeat handle, but with a small wait after the first pressure (generally used for menus)Name Type Description keynumber The key ID pressed Returns:Type Description boolean false if the other keys are blocked after it 
- 
    
    
    Draw the windows
- 
    
    
    Set the w valueName Type Default Description wnumber The w value minboolean false optional If checked, transform screen value with min x y 
- 
    
    
    Set the h valueName Type Default Description hnumber The h value minboolean false optional If checked, transform screen value with min x y 
- 
    
    
    Set the position to the left
- 
    
    
    Set the position to the top
- 
    
    
    Set the position to the right
- 
    
    
    Set the position to the bot
- 
    
    
    Set all the coords valuesName Type Description xnumber The x value ynumber The y value wnumber The w value hnumber The h value