Class: MicrogameJamMenu

menumanager~MicrogameJamMenu()

The full main menu object for running the whole main menu system.

Constructor

new MicrogameJamMenu()

Source:

Members

(private) creditsInputsDrawn

Have the credits been drawn?
Source:

(private) currMenu :string

The current menu we've loaded
Type:
  • string
Source:

(private) destMenu :string

The menu we're transitioning to.
Type:
  • string
Source:

(readonly) enabledGames

Source:

(private) inputReader :MicrogameJamMenuInputReader

Type:
  • MicrogameJamMenuInputReader
Source:

isInMenu

Setter for module:MicrogameJamMenuInputReader#isInMenu.
Source:
Mapping menu states to various functions. shouldLoop returns a boolean as to whether or not the menu's transition animation should loop. backCallback is the function to call when you hit the "back" button. onFinish is what to call when the menu's transition animation is finished.
Type:
  • Object:.<string:, {shouldLoop:: function(), backCallback:: function(), onFinish:: function()}>
Source:

(readonly) onSetup

Source:

onVolume

Setter for a callback when the options' volume slider is set. Set in MicrogameJam constructor.
Source:

(private) optionsManager :OptionsManager

Type:
  • OptionsManager
Source:

(private) setUpPromise :Promise

Promise for waiting for ini to be loaded, then call module:menumanager~MicrogameJamMenu#setUp.
Type:
  • Promise
Source:

(private) textY

For drawing the credits.
Source:

Methods

()

Initialize transitions (i.e., win and lose) using module:menumanager~ElementCreator
Source:

addSelectable(selectable)

Parameters:
Name Type Description
selectable Selectable
Source:

initMainMenu()

Initialize the main menu with a bunch of module:menumanager~ElementCreator.
Source:

pauseInputs(ms)

Pause recieving input for a bit. Used to avoid creating bugs with spamming inputs. Call module:menumanager~MicrogameJamMenuInputReader#pauseInputs.
Parameters:
Name Type Description
ms number Time in miliseconds to pause inputs for.
Source:

resetMenuInputs()

Reset recieving input and menu selection. Call module:menumanager~MicrogameJamMenuInputReader#resetMenuInputs.
Source:

setUp()

Initialize the main menu (module:menumanager~MicrogameJamMenu#initMainMenu) and initialize menu transitions (module:menumanager~MicrogameJamMenu#initTransitions).
Source:

transitionTo(menu)

Transition to a menu and call its associated CCSSGLOBAL{module:menumanager~MicrogameJamMenu#currMenu}To{menu}.
Parameters:
Name Type Description
menu string Menu state to transition to.
Source: