Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0

Class: RestoreManager

Defined in: adventure/RestoreManager.js, line 6

Todos: Restore from adventurejs.com web server.

Framework class

RestoreManager manages the job of restoring saved games. It contains all the methods needed to create the Restore pop-up screen. RestoreManager can restore a game from a local save file, from browser cookies, or from the adventurejs.com web server.

RestoreManager 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 Save & Restore pop-ups in adventurejs.css. All relevant styles are prefixed with '.save_' or '.restore_'.

Private Constructor:

var foo = new adventurejs.RestoreManager(game)

Parameters:

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

Methods Collapse all  |  Expand all

clickButton_Close()

Defined in: adventure/RestoreManager.js, line 612

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

Defined in: adventure/RestoreManager.js, line 678

Restore the seleted save file.
clickRestoreButton_File()

Defined in: adventure/RestoreManager.js, line 630

Restore the seleted save file.
clickRestoreButton_Server()

Defined in: adventure/RestoreManager.js, line 780

Restore the seleted save file.
closeDisplay()

Defined in: adventure/RestoreManager.js, line 597

Close the Restore pop-up window.
fileReaderOnload()

Defined in: adventure/RestoreManager.js, line 649

Complete the restore operation and close the pop-up.
getLocalStorageList()

Defined in: adventure/RestoreManager.js, line 706

Get a list of saved games stored in browser cookies.
openDisplay()

Defined in: adventure/RestoreManager.js, line 573

Open the Restore pop-up window.
resetDisplay()

Defined in: adventure/RestoreManager.js, line 584

Reset the Restore pop-up window.
resetLocalStorageListBox()

Defined in: adventure/RestoreManager.js, line 745

Reset local storage listbox.
selectTab()

Defined in: adventure/RestoreManager.js, line 790

Make a selected tab active.
set(props) → {adventurejs.RestoreManager}

Defined in: adventure/RestoreManager.js, line 809

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.RestoreManager Returns the instance the method is called on (useful for chaining calls.)

Properties  | 

game :Object

Defined in: adventure/RestoreManager.js, line 34

Default value: {}

A reference back to the main Game object.
restoreButtons :Array

Defined in: adventure/RestoreManager.js, line 57

Default value: []

Collection of HTML elements: the action buttons for the different restore methods.
restoreClose :HTMLElement

Defined in: adventure/RestoreManager.js, line 86

Default value: {}

Button element to close the Restore pop-up.
restoreDisplay :HTMLElement

Defined in: adventure/RestoreManager.js, line 65

Default value: {}

Div element to contain the Restore pop-up.
restoreDisplayTitle :HTMLElement

Defined in: adventure/RestoreManager.js, line 106

Default value: {}

P element to close the Restore pop-up's title bar.
restorePane_Browser :HTMLElement

Defined in: adventure/RestoreManager.js, line 375

Default value: {}

Div element to contain 'Restore from Browser' pane.
restorePane_File :HTMLElement

Defined in: adventure/RestoreManager.js, line 220

Default value: {}

Div element to contain 'Restore from File' pane.
restorePane_Server :HTMLElement

Defined in: adventure/RestoreManager.js, line 512

Default value: {}

Div element to contain 'Restore from Server' pane.
restorePanes :Array

Defined in: adventure/RestoreManager.js, line 49

Default value: []

Collection of HTML elements: the panes containing the different restore methods.
restoreRowPanes :HTMLElement

Defined in: adventure/RestoreManager.js, line 208

Default value: {}

Div element to contain Restore panes.
restoreRowTabs :HTMLElement

Defined in: adventure/RestoreManager.js, line 119

Default value: {}

Div element to contain the Restore pop-up's tabs.
restoreTab_Browser :HTMLElement

Defined in: adventure/RestoreManager.js, line 158

Default value: {}

Button element to navigate to 'Restore from Browser' option.
restoreTab_File :HTMLElement

Defined in: adventure/RestoreManager.js, line 131

Default value: {}

Button element to navigate to 'Restore from File' option.
restoreTab_Server :HTMLElement

Defined in: adventure/RestoreManager.js, line 185

Default value: {}

Button element to navigate to 'Restore from Server' option.
restoreTabs :Array

Defined in: adventure/RestoreManager.js, line 41

Default value: []

Collection of HTML elements: the tabs used to navigate between the different restore methods.
saveDisplay :HTMLElement

Defined in: adventure/SaveManager.js, line 68

Default value: {}

Div element to contain the Save pop-up.