Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0

Defined in: adventure/HintManager.js, line 6

Description

HintManager manages the job of displaying hints. It contains all the methods needed to create the Hint pop-up screen.

HintManager is created automatically by Game. This is an internal class that authors should not need to construct or modify. However, if you'd like to try, you can find styles for the Hint pop-ups in adventurejs.css. All relevant styles are prefixed with '.hint_'.

Private Constructor:

var foo = new adventurejs.HintManager(game)

Parameters:

  • game Game
    A reference to the game instance.
Inherited Overrides

Methods Collapse all  |  Expand all

clickClose
clickClose()

Defined in: adventure/HintManager.js, line 130

Function that gets called by the Close button.
closeDialog
closeDialog()

Defined in: adventure/HintManager.js, line 143

Close the Hint modal dialog.
drawHints
drawHints()

Defined in: adventure/HintManager.js, line 168

Prep hint data for display in the hints modal.
openDialog
openDialog()

Defined in: adventure/HintManager.js, line 242

Open the Hint modal dialog.
placeButtons
placeButtons()

Defined in: adventure/HintManager.js, line 283

In the case of mixed hints / hint groups, we'll have placed a reveal button in an awkward place and we want to reposition it.
revealHint
revealHint()

Defined in: adventure/HintManager.js, line 331

Reveal a hint.
set
set(props) → {adventurejs.HintManager}

Defined in: adventure/HintManager.js, line 364

Parameters:

  • props Object
    A generic object containing properties to copy to the DisplayObject instance.
Provides a chainable shortcut method for setting a number of properties on the instance.

Returns:

adventurejs.HintManager Returns the instance the method is called on (useful for chaining calls.)
updateCounts
updateCounts()

Defined in: adventure/HintManager.js, line 375

Update hint counts.

Properties  | 

game
game :Object

Defined in: adventure/HintManager.js, line 29

Default value: {}

A reference back to the main Game object.
hint_dialog
hint_dialog :HTMLElement

Defined in: adventure/HintManager.js, line 43

Default value: {}

Div element to contain the Hint dialog.
hintCancel
hintCancel :HTMLElement

Defined in: adventure/HintManager.js, line 114

Default value: {}

Button element to dispel the Hint dialog.
initialized
initialized :Object

Defined in: adventure/HintManager.js, line 36

Default value: false

Used to manage the drawing of the hint dialog.