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
IndexMethodsProperties

Methods Collapse all  |  Expand all

clickButton_Close()

Defined in: adventure/RestoreManager.js, line 582

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

Defined in: adventure/RestoreManager.js, line 655

Restore the seleted save file.
clickRestoreButton_File()

Defined in: adventure/RestoreManager.js, line 603

Restore the seleted save file.
clickRestoreButton_Server()

Defined in: adventure/RestoreManager.js, line 758

Restore the seleted save file.
closeDisplay()

Defined in: adventure/RestoreManager.js, line 565

Close the Restore pop-up window.
fileReaderOnload()

Defined in: adventure/RestoreManager.js, line 622

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

Defined in: adventure/RestoreManager.js, line 686

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

Defined in: adventure/RestoreManager.js, line 539

Open the Restore pop-up window.
resetDisplay()

Defined in: adventure/RestoreManager.js, line 551

Reset the Restore pop-up window.
resetLocalStorageListBox()

Defined in: adventure/RestoreManager.js, line 725

Reset local storage listbox.
selectTab()

Defined in: adventure/RestoreManager.js, line 774

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

Defined in: adventure/RestoreManager.js, line 798

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 Collapse all  |  Expand all

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 87

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 109

Default value: {}

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

Defined in: adventure/RestoreManager.js, line 368

Default value: {}

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

Defined in: adventure/RestoreManager.js, line 230

Default value: {}

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

Defined in: adventure/RestoreManager.js, line 477

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 216

Default value: {}

Div element to contain Restore panes.
restoreRowTabs :HTMLElement

Defined in: adventure/RestoreManager.js, line 123

Default value: {}

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

Defined in: adventure/RestoreManager.js, line 162

Default value: {}

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

Defined in: adventure/RestoreManager.js, line 136

Default value: {}

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

Defined in: adventure/RestoreManager.js, line 189

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 67

Default value: {}

Div element to contain the Save pop-up.
Documentation generated by JSDoc 3.6.11 on Mon Nov 20 2023 18:02:27 GMT-0800 (Pacific Standard Time)
Found a problem or error in the docs? Report it to docs@adventurejs.com.