Class GameplayMenu

From TrainzOnline
Revision as of 09:00, 31 October 2010 by Marinus (Talk | contribs)

Jump to: navigation, search



Contents

Constants


Menu Modes


public define int MENUMODE_NONE = 0 Not visible.
public define int MENUMODE_BUTTON = 1; Visible as a button on the gameplay menu.
public define int MENUMODE_MENU = 2; Visible as a full-screen menu.


Members


Browser m_browser An internal reference to the embedded browser object, which displays this game menu


Methods

public void SetGameplayMenuMode(Browser browser, int menuMode)
Parameters
  • browser = The Browser control which is used to visualise this GameplayMenu.
  • menuMode = One of the MENUMODE_* defines, indicating which mode we are switching to.
Returned Value
  • None
Notes
  • Called whenever the menumode of this GameplayMenu is changed.
  • Change the appearance of this menu based on menuMode by changing the HTML code of the embedded browser object m_browser


public native void CloseGameplayMenu(void)
Parameters
  • none
Returned Value
  • none
Notes
  • This function causes this gameplay menu to be closed, returning the user to the game main menu.


public void UserRequestGoBack(void)
Parameters
  • none
Returned Value
  • none
Notes
  • Called whenever the user requests a "go back" action.
  • If the user has navigated to some form of "sub menu", this should return them to the main level of this gameplay menu.
  • If at the main level, this should close the gameplay menu and return to the game main menu.


public void TADRequestRefresh(void)
Parameters
Returned Value
Notes
  • Called on a fullscreen menu when the TAD is modified.
  • Dynamic menus based on lists of assets may wish to refresh their view of the world at this time.


native bool LoadDriverQuickDrive(KUID kuid)
Parameters
  • kuid = the KUID of the map to QuickDrive.
Returned Value
  • True on success. False if something failed.
Notes
  • Loads the Driver module with the supplied map


native bool LoadDriverSession(KUID kuid)
Parameters
  • kuid = the KUID of the session to Drive.
Returned Value
  • True on success. False if something failed.
Notes
  • Loads the Driver module with a session


native bool LoadDriverScenario(KUID kuid)
Parameters
  • kuid = the KUID of the scenario to Drive.
Returned Value
  • True on success. False if something failed.
Notes
  • Loads the Driver module with a scenario
  • INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.


native bool LoadDriverSavedSession(string theSavedSession)
Parameters
  • do not use
Returned Value
  • True on success. False if something failed.
Notes
  • INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.


native bool LoadSurveyorNew()
Parameters
  • none
Returned Value
  • True on success. False if something failed.
Notes
  • Loads the Surveyor module with a new map.


native bool LoadSurveyorMap(KUID kuid)
Parameters
  • kuid = the KUID of the map to load.
Returned Value
  • True on success. False if something failed.
Notes
  • Loads the Surveyor module with a map.


native bool LoadSurveyorMapNewSession(KUID kuid)
Parameters
  • kuid = the KUID of the map to load.
Returned Value
  • True on success. False if something failed.
Notes
  • Loads the Surveyor module with a map, to start a new session.


native bool LoadSurveyorSession(KUID kuid)
Parameters
  • kuid = the KUID of the session to load.
Returned Value
  • True on success. False if something failed.
Notes
  • Loads the Surveyor module with a session.


native bool LoadRailyard(KUID kuid)
Parameters
  • kuid = the KUID of the vehicle to select in Railyard. May be null.
Returned Value
  • True on success. False if something failed.
Notes
  • Loads the Railyard module, optionally displaying the specified vehicle.


native Soup GetSavedSessionInfo()
Parameters
Returned Value
Notes
  • INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.


native bool DeleteMap(KUID theMap)
Parameters
  • theMap = the KUID of the route to delete
Returned Value
  • True if successfully deleted.
Notes
  • Deletes a specific map, and all sessions that use it


native bool DeleteSession(KUID theSession)
Parameters
  • theSession = the session to delete
Returned Value
  • True if successfully deleted.
Notes
  • Deletes a specific session


native bool DeleteScenario(KUID theScenario)
Parameters
  • theScenario = the scenario to delete
Returned Value
  • True if successfully deleted.
Notes
  • Deletes a specific scenario
  • INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.


native bool DeleteSavedSession(string theSavedSession)
Parameters
  • N/A
Returned Value
  • N/A
Notes
  • INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.



Categories

Personal tools