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

Class:RestoreManager

Defined in: adventure/RestoreManager.js, line 5

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

clickClose()

Defined in: adventure/RestoreManager.js, line 528

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

Defined in: adventure/RestoreManager.js, line 491

Close the Restore modal dialog.
fileReaderOnload()

Defined in: adventure/RestoreManager.js, line 561

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

Defined in: adventure/RestoreManager.js, line 618

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

Defined in: adventure/RestoreManager.js, line 455

Open the Restore modal dialog.
resetDialog()

Defined in: adventure/RestoreManager.js, line 479

Reset the Restore modal dialog.
resetLocalStorageListBox()

Defined in: adventure/RestoreManager.js, line 657

Reset local storage listbox.
restoreFromBrowser()

Defined in: adventure/RestoreManager.js, line 590

Restore the selected save file.
restoreFromFile()

Defined in: adventure/RestoreManager.js, line 542

Restore the selected save file.
restoreFromServer()

Defined in: adventure/RestoreManager.js, line 692

Restore the seleted save file.
selectTab()

Defined in: adventure/RestoreManager.js, line 702

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

Defined in: adventure/RestoreManager.js, line 721

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 33

Default value: {}

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

Defined in: adventure/RestoreManager.js, line 64

Default value: {}

Div element to contain the Restore pop-up.
restoreButtons :Array

Defined in: adventure/RestoreManager.js, line 56

Default value: []

Collection of HTML elements: the action buttons for the different restore methods.
restorePanes :Array

Defined in: adventure/RestoreManager.js, line 48

Default value: []

Collection of HTML elements: the panes containing the different restore methods.
restoreTabs :Array

Defined in: adventure/RestoreManager.js, line 40

Default value: []

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