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

Description

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
clickClose()

Defined in: adventure/RestoreManager.js, line 525

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

Defined in: adventure/RestoreManager.js, line 539

Restore.
closeDialog
closeDialog()

Defined in: adventure/RestoreManager.js, line 488

Close the Restore modal dialog.
fileReaderOnload
fileReaderOnload()

Defined in: adventure/RestoreManager.js, line 583

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

Defined in: adventure/RestoreManager.js, line 649

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

Defined in: adventure/RestoreManager.js, line 452

Open the Restore modal dialog.
resetDialog
resetDialog()

Defined in: adventure/RestoreManager.js, line 476

Reset the Restore modal dialog.
resetLocalStorageListBox
resetLocalStorageListBox()

Defined in: adventure/RestoreManager.js, line 685

Reset local storage listbox.
restoreFromBrowser
restoreFromBrowser()

Defined in: adventure/RestoreManager.js, line 617

Restore the selected save file.
restoreFromFile
restoreFromFile()

Defined in: adventure/RestoreManager.js, line 564

Restore the selected save file.
restoreFromServer
restoreFromServer()

Defined in: adventure/RestoreManager.js, line 719

Restore the seleted save file.
selectTab
selectTab()

Defined in: adventure/RestoreManager.js, line 729

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

Defined in: adventure/RestoreManager.js, line 748

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
game :Object

Defined in: adventure/RestoreManager.js, line 33

Default value: {}

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

Defined in: adventure/RestoreManager.js, line 64

Default value: {}

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

Defined in: adventure/RestoreManager.js, line 56

Default value: []

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

Defined in: adventure/RestoreManager.js, line 48

Default value: []

Collection of HTML elements: the panes containing the different restore methods.
restoreTabs
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.