Class: GameList

optionsmanager~GameList()

A list of games that we can select and do options for.

Constructor

new GameList()

Source:

Extends

Members

(private) center

Center of the box shape.
Overrides:
Source:

(readonly) fullPos :MenuVector

Returns module:menulib~MenuVectorField#position plus the CSS offsets.
Type:
  • MenuVector
Overrides:
Source:

(private) optionFields :Object

A list of options to select from.
Type:
  • Object
Source:

(private) optionsPick :number

What set of options have we currently selected?
Type:
  • number
Source:

(private) optionsSubSelect :boolean

Are we in the sub-selection menu for a given option?
Type:
  • boolean
Source:

position

The current position of the Selectable in HTML space (CSS not included, that's added in module:menulib~MenuVectorField#fullPos)
Overrides:
Source:

(private) selected :number

The current game selected.
Type:
  • number
Source:

Methods

clearSelect()

Clear the currently selected element.
Overrides:
Source:

click()

Click over the selected element.
Overrides:
Source:

findPosition()

Calculate this element's position based on its current HTML offset and its parent's HTML offsets.
Overrides:
Source:

isSelectable() → {boolean}

Returns whether or not this element is selectable.
Overrides:
Source:
Returns:
Type
boolean

isSelectableWithinBounds(baseOffset) → {boolean}

Calculates the visibility of the Selectable given its current position within the frame, and returns true if it's visible within the HTML frame, and false otherwise.
Parameters:
Name Type Description
baseOffset MenuVector How much the Selectable is offset from its given position (i.e., how do its parents offset it?).
Overrides:
Source:
Returns:
Type
boolean

optionsSelect(direction, inputReader) → (nullable) {boolean}

Given an input direction (with the assumption that we are currently in the options menu), select a given option from either the list of options by game, or the sub-list of options for a game.
Parameters:
Name Type Description
direction module:menulib~MenuVector
inputReader module:menumanager~MicrogameJamMenuInputReader
Source:
Returns:
Did we land on a valid element and select it?
Type
boolean

select()

Actually hover over the selected element. Called when this element is first selected (and gets overrided by module:optionsmanager~GameList#selectElement for subsequent calls with the arrow keys).
Overrides:
Source:

selectElement(direction, inputReader)

Pick an element to select from a direction.
Parameters:
Name Type Description
direction module:menulib~MenuVector
inputReader module:menumanager~MicrogameJamMenuInputReader
Source: