Package storageManager

Class MacaoPage

Fields   Methods

The class MacaoPage is not a class itself, but it is used to document the global properties and methods of the package core/storageManager.js.

Field Summary
String basePath
     This field keeps the path from the current page to the Macao base directory. It is strongly recommended to set this field before loading the Java Script libraries.

Method Summary
void addInventoryItem(String inventoryName, String itemName, String itemTitle, String imageUrl, String itemSubtitle, float quantity)
     Call this method to add an inventory item to the Storage Manager.
void clearInventory(String inventoryName)
     Call this method to remove all items of an inventory from the Storage Manager.
void defResource(String resourceName, String language1Text, optional String language2Text)
     Use this method to define the texts of a text resource in one or more languages.
String getBasePath()
     Use this method to get the base path.
Array getInventoryItems(String inventoryName)
     Call this method to get the definitions of all items of an inventory from the Storage Manager.
String getLanguageSM()
     Call this method to get the actual language of the application.
String getPageName()
     This method calculates the name of the page from the page's filename, by removing the extension.
String getParameterSM(String parameterName)
     Call this method to get the value of a parameter, which is provided with the URL, which was used to open the page.
Array getParametersSM()
     Call this method to get the parameters, which are provided with the URL.
String getResource(String resourceName, optional String defaultLanguageText, optional boolean nullIfUndefined)
     Use this method to get the content of a text resource for the actual language.
boolean isDesignModeSM()
     Call this method to check, if the design mode is active.
void openResourceExportWindow()
     This method opens a dialog window to export the text resources.
void setBasePath(String path)
     You may use this method to set the base path.
void setDesignModeSM(boolean active)
     Call this method to set the design mode active or inactive.
void setLanguageSM(String language)
     Call this method to set the actual language of the application.
void setResourceDefaultLanguage(String language)
     This method sets the language, which is used by the parameter defaultLanguageText of the method getResource().
void setResourceDefinitionLanguages(Array languagesArray)
     This method sets the languages, which are used by the method defResource() to define resource texts.
boolean storageGetGameEvent(String eventName)
     Call this method to get a game event from the storage manager.
variant storageGetValue(String valueName)
     Call this method to get a stored value from the storage manager.
void storageSetGameEvent(String eventName, boolean setEvent)
     Call this method to store a game event in the storage manager.
void storageSetValue(String valueName, variant value)
     Call this method to store a value in the storage manager.

Field Details
String basePath

Method Details
void addInventoryItem(String inventoryName, String itemName, String itemTitle, String imageUrl, String itemSubtitle, float quantity)

void clearInventory(String inventoryName)

void defResource(String resourceName, String language1Text, optional String language2Text)

String getBasePath()

Array getInventoryItems(String inventoryName)

String getLanguageSM()

String getPageName()

String getParameterSM(String parameterName)

Array getParametersSM()

String getResource(String resourceName, optional String defaultLanguageText, optional boolean nullIfUndefined)

boolean isDesignModeSM()

void openResourceExportWindow()

void setBasePath(String path)

void setDesignModeSM(boolean active)

void setLanguageSM(String language)

void setResourceDefaultLanguage(String language)

void setResourceDefinitionLanguages(Array languagesArray)

boolean storageGetGameEvent(String eventName)

variant storageGetValue(String valueName)

void storageSetGameEvent(String eventName, boolean setEvent)

void storageSetValue(String valueName, variant value)