<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.trainzsimulator.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Marinus</id>
	<title>TrainzOnline - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.trainzsimulator.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Marinus"/>
	<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/wiki/Special:Contributions/Marinus"/>
	<updated>2026-11-05T05:47:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=New_TrainzScript_Features_-_TS2009&amp;diff=1687</id>
		<title>New TrainzScript Features - TS2009</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=New_TrainzScript_Features_-_TS2009&amp;diff=1687"/>
		<updated>2010-10-31T00:32:42Z</updated>

		<summary type="html">&lt;p&gt;Marinus: /* Global script context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following features are newly added to TrainzScript in [[TS2009]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Cross-asset script includes =&lt;br /&gt;
As of trainz-build 2.9, any scripted asset may directly include script files from the top-level directory of any other scripted asset. In your script code, you use the &#039;include&#039; keyword as normal to import the script file. In order for Trainz to find the include file, you must make the following [[config.txt file]] changes:&lt;br /&gt;
&lt;br /&gt;
* Add a &#039;&#039;script-include-table&#039;&#039; and list the KUID of the asset(s) from which you will be including files.&lt;br /&gt;
* Add the same KUIDs to your asset&#039;s &#039;&#039;kuid-table&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You must ensure that there are no script filename conflicts between any assets involved.&lt;br /&gt;
&lt;br /&gt;
= Global script context =&lt;br /&gt;
Trainz now runs multiple concurrent script virtual machines (VMs). Objects in each VM are largely disassociated, but because the native interface is shared, there is some level of cross-talk. This has not been clearly delineated, and is likely to change in future versions once we&#039;ve had time to investigate it further. For now, you should treat the VMs as completely distinct except where Auran documentation explicitly declares otherwise.&lt;br /&gt;
&lt;br /&gt;
The two obvious script contexts are the global menu system, and the active module.&lt;br /&gt;
* The global VM is responsible for global settings libraries, menubar interface addons, etc. and does not have access to the World. It persists until Trainz exits.&lt;br /&gt;
* The active module VM is responsible for maintaining the session, route, and gameplay aspects and does not persist beyond the lifetime of the module.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[KIND Library|Libraries]] can be forced to always load in the global script context using a config.txt tag&lt;br /&gt;
 always-load-in-global-context 1&lt;br /&gt;
&lt;br /&gt;
If a library is shared between assets, it is important to be aware in which context the library is loaded. A script running in a gameplay context can make calls to a Library in the global context. The reverse is not possible. If &#039;&#039;always-load-in-global-context&#039;&#039; is not used, assets running in gameplay  context will access an instance of the library also running in gameplay context. Assets running in global context however access an instance of the library in global context. In other words, there are two parallel instances of the ibrary. To prevent this situation the &#039;&#039;always-load-in-global-context&#039;&#039; tag forces the library to only load once (in global context). The library resisting in global context is then available to other assets in gameplay and global context.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CAUTION:&#039;&#039;&#039; there are some pitfalls when passing data between objects in different contexts. No references to objects of another context can be stored as members. This means you must make a copy of every &#039;&#039;reference&#039;&#039; type (e.g. strings and arrays) you want to store in another context. In other words, you need to extract any relevant details during the cross-context call and keep copies. [[Types#string|Strings]] are copied using [[class Str#CloneString|Str.CloneString()]] and [[Types#Array|arrays]] can be copied using the [[Arrays#copy|copy()]] operator. There are also possible limitations to cross context message passing, sniffing, etc.&lt;br /&gt;
&lt;br /&gt;
Scripts running in global context cannot use some of the functions which are intended for the game context (e.g. driver module). This concerns mainly functions of [[class World]] and [[class Interface]]. Calling these functions from global context causes a &#039;&#039;ER_NativeCallError&#039;&#039; script exception.&lt;br /&gt;
&lt;br /&gt;
= Global settings libraries =&lt;br /&gt;
Global settings libraries are standard script libraries with an additional tag entry in their [[config.txt file]]s.&lt;br /&gt;
&lt;br /&gt;
 custom-category-list &amp;quot;GSET&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The global settings libraries are loaded into the global VM in the following scenarios:&lt;br /&gt;
* The user clicks on the library in the [[Trainz Settings]] dialog.&lt;br /&gt;
* Another script in the global VM calls GetLibrary().&lt;br /&gt;
* The library is a built-in settings library recognized by Trainz, and Trainz wishes to read the current settings.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;note: Currently there is nothing to stop a global settings library from being loaded into a module VM. It is likely that we&#039;ll change this prior to release, to ensure that they&#039;re loaded into the global VM regardless of from where they&#039;re instantiated.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Libraries loaded into the global module have their properties saved to the global settings file.&lt;br /&gt;
&lt;br /&gt;
The following TS2009 built-in content are Global Settings Libraries:&lt;br /&gt;
* &amp;quot;Video Settings&amp;quot; &amp;lt;kuid:30501:1021&amp;gt;&lt;br /&gt;
* &amp;quot;Surveyor Settings&amp;quot; &amp;lt;kuid:30501:1022&amp;gt;&lt;br /&gt;
* &amp;quot;Global Interface Addons&amp;quot; &amp;lt;kuid:30501:1026&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Interface Addons =&lt;br /&gt;
Interface Addons are standard script libraries with an additional tag entry in their [[config.txt file]]s.&lt;br /&gt;
&lt;br /&gt;
 custom-category-list &amp;quot;GADD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Interface Addons are loaded into the global VM by the &amp;quot;Global Interface Addons&amp;quot; library. The user must choose to enable the interface addon before it is loaded.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;note: As they are normal script libraries, the interface addons may be loaded through other means. The &amp;quot;Global Interface Addons&amp;quot; library also provides a mechanism for users to unload addons. At the current time, this requires the user to reload Trainz; it is likely that we will add a script mechanism to truly unload the library, or at least tell it to clean up. We are also likely to provide a mechanism for interface addons to determine whether they were loaded by the Global Interface Addon (and should display their UI) or by some other mechanism (in which case they should remain hidden.)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The following TS2009 built-in content are Interface Addons:&lt;br /&gt;
* &amp;quot;iTrainz Chat Interface&amp;quot; &amp;lt;kuid:30501:1003&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= iTrainz URL Helper library =&lt;br /&gt;
This script library provides a unified mechanism for handling custom &#039;&#039;trainz://xx/yy&#039;&#039; style URLs, regardless of where they occur in the game. The library is used by native code, and by scripts via the new TrainzScript.OpenURL() function.  Script code should never call into this library directly where a call to TrainzScript.OpenURL() would suffice, as the native code may perform some URL parsing before handing over to the script library.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;iTrainz URL Helper library&amp;quot; is &amp;lt;kuid:30501:1025&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;note: Currently there is nothing to stop this library from being loaded into a module VM. It is likely that we&#039;ll change this prior to release, to ensure that it&#039;s loaded into the global VM regardless of from where it&#039;s instantiated.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The current version of the library supports the following URL styles:&lt;br /&gt;
* &#039;&#039;trainz://buddy/NAME&#039;&#039; - routed to the &amp;quot;iTrainz Chat Interface&amp;quot;&lt;br /&gt;
* &#039;&#039;trainz://channel/NAME&#039;&#039; - routed to the &amp;quot;iTrainz Chat Interface&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The OpenURL() call will additionally support the following URL styles internally:&lt;br /&gt;
* &#039;&#039;trainz://install/KUID&#039;&#039; - opens an &#039;asset details&#039; window which allows the user to install the specified content.&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=New_TrainzScript_Features_-_TS2009&amp;diff=1686</id>
		<title>New TrainzScript Features - TS2009</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=New_TrainzScript_Features_-_TS2009&amp;diff=1686"/>
		<updated>2010-10-31T00:20:12Z</updated>

		<summary type="html">&lt;p&gt;Marinus: /* Global script context */  - added always-load-in-global-context information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following features are newly added to TrainzScript in [[TS2009]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Cross-asset script includes =&lt;br /&gt;
As of trainz-build 2.9, any scripted asset may directly include script files from the top-level directory of any other scripted asset. In your script code, you use the &#039;include&#039; keyword as normal to import the script file. In order for Trainz to find the include file, you must make the following [[config.txt file]] changes:&lt;br /&gt;
&lt;br /&gt;
* Add a &#039;&#039;script-include-table&#039;&#039; and list the KUID of the asset(s) from which you will be including files.&lt;br /&gt;
* Add the same KUIDs to your asset&#039;s &#039;&#039;kuid-table&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You must ensure that there are no script filename conflicts between any assets involved.&lt;br /&gt;
&lt;br /&gt;
= Global script context =&lt;br /&gt;
Trainz now runs multiple concurrent script virtual machines (VMs). Objects in each VM are largely disassociated, but because the native interface is shared, there is some level of cross-talk. This has not been clearly delineated, and is likely to change in future versions once we&#039;ve had time to investigate it further. For now, you should treat the VMs as completely distinct except where Auran documentation explicitly declares otherwise.&lt;br /&gt;
&lt;br /&gt;
The two obvious script contexts are the global menu system, and the active module.&lt;br /&gt;
* The global VM is responsible for global settings libraries, menubar interface addons, etc. and does not have access to the World. It persists until Trainz exits.&lt;br /&gt;
* The active module VM is responsible for maintaining the session, route, and gameplay aspects and does not persist beyond the lifetime of the module.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[KIND Library|Libraries]] can be forced to always load in the global script context using a config.txt tag&lt;br /&gt;
 always-load-in-global-context 1&lt;br /&gt;
&lt;br /&gt;
If a library is shared between assets, it is important to be aware in which context the library is loaded. If &#039;&#039;always-load-in-global-context&#039;&#039; is not used, assets running in local (active module) context will access an instance of the library also running in local context. Assets running in global context however access an instance of the library in global context. In other words, there are two parallel instances of the ibrary. To prevent this situation the &#039;&#039;always-load-in-global-context&#039;&#039; tag forces the library to only load once (in global context). The library resisting in global context is then available to other assets in local and global context.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CAUTION:&#039;&#039;&#039; there are some pitfalls when passing data between objects in different contexts. No references to objects of another context can be stored as members. This means you must make a copy of every &#039;&#039;reference&#039;&#039; type (e.g. strings and arrays) you want to store in another context. In other words, you need to extract any relevant details during the cross-context call and keep copies. [[Types#string|Strings]] are copied using [[class Str#CloneString|Str.CloneString()]] and [[Types#Array|arrays]] can be copied using the [[Arrays#copy|copy()]] operator. There are also possible limitations to cross context message passing, sniffing, etc.&lt;br /&gt;
&lt;br /&gt;
Scripts running in global context cannot use some of the functions which are intended for the game context (e.g. driver module). This concerns mainly functions of [[class World]] and [[class Interface]]. Calling these functions from global context causes a &#039;&#039;ER_NativeCallError&#039;&#039; script exception.&lt;br /&gt;
&lt;br /&gt;
= Global settings libraries =&lt;br /&gt;
Global settings libraries are standard script libraries with an additional tag entry in their [[config.txt file]]s.&lt;br /&gt;
&lt;br /&gt;
 custom-category-list &amp;quot;GSET&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The global settings libraries are loaded into the global VM in the following scenarios:&lt;br /&gt;
* The user clicks on the library in the [[Trainz Settings]] dialog.&lt;br /&gt;
* Another script in the global VM calls GetLibrary().&lt;br /&gt;
* The library is a built-in settings library recognized by Trainz, and Trainz wishes to read the current settings.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;note: Currently there is nothing to stop a global settings library from being loaded into a module VM. It is likely that we&#039;ll change this prior to release, to ensure that they&#039;re loaded into the global VM regardless of from where they&#039;re instantiated.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Libraries loaded into the global module have their properties saved to the global settings file.&lt;br /&gt;
&lt;br /&gt;
The following TS2009 built-in content are Global Settings Libraries:&lt;br /&gt;
* &amp;quot;Video Settings&amp;quot; &amp;lt;kuid:30501:1021&amp;gt;&lt;br /&gt;
* &amp;quot;Surveyor Settings&amp;quot; &amp;lt;kuid:30501:1022&amp;gt;&lt;br /&gt;
* &amp;quot;Global Interface Addons&amp;quot; &amp;lt;kuid:30501:1026&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Interface Addons =&lt;br /&gt;
Interface Addons are standard script libraries with an additional tag entry in their [[config.txt file]]s.&lt;br /&gt;
&lt;br /&gt;
 custom-category-list &amp;quot;GADD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Interface Addons are loaded into the global VM by the &amp;quot;Global Interface Addons&amp;quot; library. The user must choose to enable the interface addon before it is loaded.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;note: As they are normal script libraries, the interface addons may be loaded through other means. The &amp;quot;Global Interface Addons&amp;quot; library also provides a mechanism for users to unload addons. At the current time, this requires the user to reload Trainz; it is likely that we will add a script mechanism to truly unload the library, or at least tell it to clean up. We are also likely to provide a mechanism for interface addons to determine whether they were loaded by the Global Interface Addon (and should display their UI) or by some other mechanism (in which case they should remain hidden.)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The following TS2009 built-in content are Interface Addons:&lt;br /&gt;
* &amp;quot;iTrainz Chat Interface&amp;quot; &amp;lt;kuid:30501:1003&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= iTrainz URL Helper library =&lt;br /&gt;
This script library provides a unified mechanism for handling custom &#039;&#039;trainz://xx/yy&#039;&#039; style URLs, regardless of where they occur in the game. The library is used by native code, and by scripts via the new TrainzScript.OpenURL() function.  Script code should never call into this library directly where a call to TrainzScript.OpenURL() would suffice, as the native code may perform some URL parsing before handing over to the script library.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;iTrainz URL Helper library&amp;quot; is &amp;lt;kuid:30501:1025&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;note: Currently there is nothing to stop this library from being loaded into a module VM. It is likely that we&#039;ll change this prior to release, to ensure that it&#039;s loaded into the global VM regardless of from where it&#039;s instantiated.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The current version of the library supports the following URL styles:&lt;br /&gt;
* &#039;&#039;trainz://buddy/NAME&#039;&#039; - routed to the &amp;quot;iTrainz Chat Interface&amp;quot;&lt;br /&gt;
* &#039;&#039;trainz://channel/NAME&#039;&#039; - routed to the &amp;quot;iTrainz Chat Interface&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The OpenURL() call will additionally support the following URL styles internally:&lt;br /&gt;
* &#039;&#039;trainz://install/KUID&#039;&#039; - opens an &#039;asset details&#039; window which allows the user to install the specified content.&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=KIND_Library&amp;diff=1685</id>
		<title>KIND Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=KIND_Library&amp;diff=1685"/>
		<updated>2010-10-31T00:16:25Z</updated>

		<summary type="html">&lt;p&gt;Marinus: /* Supported Tags */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;KIND Library is a coded module that interacts with other coded modules.&lt;br /&gt;
&lt;br /&gt;
==KIND Hierarchy==&lt;br /&gt;
===Parent Classes===&lt;br /&gt;
* &#039;&#039;none.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Child Classes===&lt;br /&gt;
* &#039;&#039;none.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Supported Tags==&lt;br /&gt;
Each Library asset supports the following tags. Each tag is shown here with its default value.&lt;br /&gt;
* &#039;&#039;always-load-in-global-context&#039;&#039; if set to &#039;1&#039;, library is always loaded to [[New_TrainzScript_Features#Global_script_context|global script context]]&lt;br /&gt;
&lt;br /&gt;
==Example Config.txt==&lt;br /&gt;
Sample [[config.txt file]] for a library asset, with the Standard Tags excluded for brevity:&lt;br /&gt;
&lt;br /&gt;
 kind   &amp;quot;library&amp;quot;&lt;br /&gt;
 script &amp;quot;LibraryScript.gs&amp;quot;&lt;br /&gt;
 class  &amp;quot;LibraryClass&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Downloads==&lt;br /&gt;
&#039;&#039;Attach sample files here?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Asset KIND]]&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Arrays&amp;diff=1684</id>
		<title>Arrays</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Arrays&amp;diff=1684"/>
		<updated>2010-10-31T00:10:58Z</updated>

		<summary type="html">&lt;p&gt;Marinus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Declaration, Initialisation &amp;amp; Population==&lt;br /&gt;
*Arrays need to be declared and initialised before they can be accessed, and it will usually be necessary to populate the array with meaningful data.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|Declaration}}&lt;br /&gt;
*A declaration reserves memory for the variable and allocates a name for that particular array.  This is analogous to a housing developer buying a site and reserving it for future construction.&lt;br /&gt;
&lt;br /&gt;
*To declare an array you must first define the type of object which the array will contain, followed by opening and closing square braces and the name you will use to reference the array variable.&lt;br /&gt;
&lt;br /&gt;
*Just as residential developments can consist of any building type, arrays can consist of almost any class, including classes which you have defined yourself.&lt;br /&gt;
&lt;br /&gt;
 Vehicle[] vehicles;&lt;br /&gt;
 int[] numberList;&lt;br /&gt;
 string[] words;&lt;br /&gt;
 GameObject[] objects;&lt;br /&gt;
 MyOwnClass[] myObjects;&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|Initialisation}}&lt;br /&gt;
*In the same way that a developer must decide how many units he wants to build, you must decide how many members your array will initially be able to contain.  You will be able to make the array larger or smaller later, for now you are just setting the initial size.&lt;br /&gt;
*To initialise the array you use the keyword new, followed by the class of object that the array is to contain and the initial number of members in square brackets.&lt;br /&gt;
&lt;br /&gt;
 vehicles = new Vehicle[5];&lt;br /&gt;
 numberList = new int[10];&lt;br /&gt;
 words = new string[2];&lt;br /&gt;
 objects = new GameObject[3];&lt;br /&gt;
 myObjects = new MyOwnClass[7];&lt;br /&gt;
&lt;br /&gt;
*It is possible, and often convenient, to declare and initialise the array in a single statement:&lt;br /&gt;
&lt;br /&gt;
 Vehicle[] vehicles = new Vehicle[5];&lt;br /&gt;
 int[] numberList = new int[10];&lt;br /&gt;
 string[] words = new string[2];&lt;br /&gt;
 GameObject[] objects = new GameObject[3];&lt;br /&gt;
 MyOwnClass[] myObjects = new MyOwnClass[7];&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|Population}}&lt;br /&gt;
*We now have a plot of land and some completed buildings but it will still be meaningless to call at an individual house because no-one will be living there.&lt;br /&gt;
&lt;br /&gt;
*You can populate the individual elements by assigning a value to an indexed position in the array. The syntax for this is:&lt;br /&gt;
&lt;br /&gt;
 vehicles[0] = GetMyTrain().GetVehicles[3];&lt;br /&gt;
 numberList[0] = 0;&lt;br /&gt;
 words[3] = &amp;quot;sentences&amp;quot;&lt;br /&gt;
 objects[0] = me;&lt;br /&gt;
 myObjects[2] = Router,GetGameObject(&amp;quot;my sibling&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|Array Methods}}&lt;br /&gt;
*A further shortcut is to use a method which returns an array to initialise and populate your array in a single statement.  Often the same statement can also contain the declaration:&lt;br /&gt;
&lt;br /&gt;
 Vehicle[] vehicles = World.GetVehicleList();&lt;br /&gt;
 int[] numberList = GetNumberList(1,10);&lt;br /&gt;
 string[] words = Str.Tokens(&amp;quot;comma,separated,list&amp;quot;,&amp;quot;,&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
*You can write your own methods to return arrays:&lt;br /&gt;
&lt;br /&gt;
 int[] GetNumberList(int start, int count) {&lt;br /&gt;
   int[] result = new int[0];&lt;br /&gt;
   int i;&lt;br /&gt;
   for (i = start; i &amp;lt; count; i++) {&lt;br /&gt;
     result[result.size()] = i;&lt;br /&gt;
   }&lt;br /&gt;
   return result;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Array Operators==&lt;br /&gt;
{{MethodHeader|Appending to an Array}}&lt;br /&gt;
*This is a syntax which allows you to increase the size of a properly initialised array by adding a new member to the end. Since array indexing starts at zero, the last member will always be &#039;&#039;array[array.size() - 1]&#039;&#039;.  &lt;br /&gt;
&lt;br /&gt;
*Trying to read from &#039;&#039;array[array.size()]&#039;&#039; will result in a range error because you are attempting to access a location which does not exist.&lt;br /&gt;
&lt;br /&gt;
*Assigning to &#039;&#039;array[array.size()]&#039;&#039; however, will create a new member and increment the number of items in the array.&lt;br /&gt;
&lt;br /&gt;
 vehicles[vehicles.size()] = me;&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|Indexing}}&lt;br /&gt;
*A subscript enclosed in square brackets serves to define an individual item within an array.  The notation will only be meaningful if that particular item has a value assigned. Assuming that this is the case when it isn&#039;t is a common error, and one that can be very difficult to find.&lt;br /&gt;
&lt;br /&gt;
*Given these statements:&lt;br /&gt;
&lt;br /&gt;
 int[] numbers = new int[3];&lt;br /&gt;
 numbers[0] = 0;&lt;br /&gt;
 numbers[2] = 2;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;numbers[0]&#039;&#039; will return zero as an integer&lt;br /&gt;
*&#039;&#039;numbers[2]&#039;&#039; will return the value 2&lt;br /&gt;
*&#039;&#039;numbers[1]&#039;&#039; however will return null since no value has been assigned to that particular item.&lt;br /&gt;
&lt;br /&gt;
*Array indexing starts at zero (don&#039;t ask why) and finishes at &#039;&#039;array.size() - 1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|Range Indexing}}&lt;br /&gt;
*Whilst it is straightforward to erase a value from an array by assigning it to null, this doesn&#039;t affect the size of the array itself.&lt;br /&gt;
&lt;br /&gt;
*Given these statements:&lt;br /&gt;
&lt;br /&gt;
 int[] numbers = new int[3];&lt;br /&gt;
 numbers[0] = 0;&lt;br /&gt;
 numbers[1] = 1;&lt;br /&gt;
 numbers[2] = 2;&lt;br /&gt;
&lt;br /&gt;
*Making the assignment &#039;&#039;numbers[2] = null&#039;&#039; will clear out the value but the array will still contain 3 items.&lt;br /&gt;
&lt;br /&gt;
*You can delete items and reduce the size of the array at the same time by specifying a range index like this:&lt;br /&gt;
&lt;br /&gt;
 numbers[0,1] = null;&lt;br /&gt;
&lt;br /&gt;
*The first index is the position of the item to remove and the second is one greater than the position of the last item.&lt;br /&gt;
&lt;br /&gt;
 numbers[0,1] = null removes the first item&lt;br /&gt;
 numbers[2,3] = null removes the last item&lt;br /&gt;
&lt;br /&gt;
*Array range indexing is an important tool for use with strings (which are really arrays of characters)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|size()}}&lt;br /&gt;
*&#039;&#039;array.size()&#039;&#039; returns a count of the items in the array, this is no guarantee that all of the items have a value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{anchor|copy}}{{MethodHeader|copy()}}&lt;br /&gt;
*&#039;&#039;copy()&#039;&#039; creates a duplicate of the array, the syntax is:&lt;br /&gt;
&lt;br /&gt;
 int[] old = new int[3];&lt;br /&gt;
 int[] new;&lt;br /&gt;
 new.copy(old);&lt;br /&gt;
&lt;br /&gt;
*There is a subtle difference between copying an array and creating a duplicate reference to it by assignment.  In the case above, the array &#039;&#039;new&#039;&#039; is an entirely separate variable from the array &#039;&#039;old&#039;&#039;. Changing the values of one will not affect the other.&lt;br /&gt;
&lt;br /&gt;
 int[] old = new int[3];&lt;br /&gt;
 int[] new;&lt;br /&gt;
 new = old;&lt;br /&gt;
&lt;br /&gt;
*will produce a similar result at first glance, but in this case assigning a new value to &#039;&#039;new[1]&#039;&#039; will also change the value of &#039;&#039;old[1]&#039;&#039;. This is because the assignment effectively creates an alternative name for the same data.&lt;br /&gt;
&lt;br /&gt;
==Code Samples==&lt;br /&gt;
{{MethodHeader|Array Handling Methods}}&lt;br /&gt;
*These are example routines which carry out some basic operations on string arrays, all the routines are case sensitive.  They can be used for other object types with appropriate modification.&lt;br /&gt;
&lt;br /&gt;
*Member returns true if the string &#039;s&#039; is contained within the array &#039;strings&#039;.&lt;br /&gt;
&lt;br /&gt;
 public bool Member(string[] strings, string s) {&lt;br /&gt;
   int n;&lt;br /&gt;
   bool result = false;&lt;br /&gt;
   if (strings.size() == 0) {return result;}&lt;br /&gt;
   for (n = 0; n &amp;lt; strings.size(); n++) {&lt;br /&gt;
     if (s == strings[n]) {&lt;br /&gt;
       result = true;&lt;br /&gt;
       break;&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   return result;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*Add will append string &#039;s&#039; to the end of the array &#039;strings&#039; as long as &#039;s&#039; is not already present.&lt;br /&gt;
&lt;br /&gt;
 public void Add(string[] strings, string s) {&lt;br /&gt;
   if (Member(strings,s)) return;&lt;br /&gt;
   else {strings[strings.size()] = s;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*Remove will delete any instance of string &#039;s&#039; from the array and reduce the size of the array accordingly.&lt;br /&gt;
&lt;br /&gt;
 public void Remove(string[] strings, string s) {&lt;br /&gt;
   int n;&lt;br /&gt;
   if (strings.size() == 0) return;&lt;br /&gt;
   for (n = 0; n &amp;lt; strings.size(); n++) {&lt;br /&gt;
     if (s == strings[n]) {strings[n,n+1] = null;}&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*Sort will perform a case sensitive alpha sort of the strings in the array. This is a flagged bubble sort, simple but slow, and is fine for most small arrays.  For large arrays you should write your own quicksort method.&lt;br /&gt;
&lt;br /&gt;
 public void Sort(string[] strings) {&lt;br /&gt;
   int x,y;&lt;br /&gt;
   string temp;&lt;br /&gt;
   bool flag;&lt;br /&gt;
   for (x = 0; x &amp;lt; strings.size(); x++) {&lt;br /&gt;
     flag = false;&lt;br /&gt;
     for (y = 0; y &amp;lt; strings.size() - 1; y++) {&lt;br /&gt;
       if (strings[y] &amp;gt; strings[y + 1]) {&lt;br /&gt;
         temp = strings[y + 1];&lt;br /&gt;
         strings[y + 1] = strings[y];&lt;br /&gt;
         strings[y] = temp;&lt;br /&gt;
         flag = true;&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
     if (!flag) break;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Types&amp;diff=1683</id>
		<title>Types</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Types&amp;diff=1683"/>
		<updated>2010-10-31T00:09:22Z</updated>

		<summary type="html">&lt;p&gt;Marinus: added anchors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{anchor|bool}}{{MethodHeader|bool}}&lt;br /&gt;
*Contains the Boolean constants &#039;&#039;true&#039;&#039; or &#039;&#039;false&#039;&#039;&lt;br /&gt;
*Casting an integer of value 0 to a bool will result in &#039;&#039;false&#039;&#039;, any other value will result in &#039;&#039;true&#039;&#039;.&lt;br /&gt;
 !false = true&lt;br /&gt;
 (bool) 0 = false&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{anchor|int}}{{MethodHeader|int}}&lt;br /&gt;
*32 bit integer&lt;br /&gt;
*Range from -2147483647 .. 2147483647&lt;br /&gt;
 Formats&lt;br /&gt;
 100&lt;br /&gt;
 +100&lt;br /&gt;
 -100&lt;br /&gt;
 hex?&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{anchor|float}}{{MethodHeader|float}}&lt;br /&gt;
*32 bit floating number&lt;br /&gt;
 Formats&lt;br /&gt;
 1.0&lt;br /&gt;
 1.0f&lt;br /&gt;
 polish notation?&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{anchor|object}}{{MethodHeader|object}}&lt;br /&gt;
*&#039;&#039;object&#039;&#039; is a base class which may be used to store references to objects of any class.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{anchor|string}}{{MethodHeader|string}}&lt;br /&gt;
*Strings can be indexed as arrays.&lt;br /&gt;
*Strings support the following escape sequences&lt;br /&gt;
 \r   ?&lt;br /&gt;
 \n   New line&lt;br /&gt;
 \t   Tab character&lt;br /&gt;
 \l   ?&lt;br /&gt;
 \a   ?&lt;br /&gt;
 \b   ?&lt;br /&gt;
 \\   Backslash&lt;br /&gt;
 \&amp;quot;   Double quote mark&lt;br /&gt;
 \&#039;   Single quote mark&lt;br /&gt;
 \0   ?&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{anchor|Array}}{{MethodHeader|Array Types}}&lt;br /&gt;
*Arrays are indexed lists of any base type or any class type including GameObjects.&lt;br /&gt;
*Arrays are declared using these statements&lt;br /&gt;
 Train[] trains;&lt;br /&gt;
 int[] Numbers = new int[n]; // where &#039;&#039;n&#039;&#039; is the number of items in the array.&lt;br /&gt;
*The keyword &#039;&#039;new&#039;&#039; creates the array but does not initialise any of the members&lt;br /&gt;
 Numbers[3] = 256; // assigns a value to the array. Array indices start at zero&lt;br /&gt;
*Arrays may also be returned by methods&lt;br /&gt;
 Signal[] signals = World.GetSignalList()  // creates an array of signals from a built in method&lt;br /&gt;
 Numbers[Numbers.size()] = 5;              // adds a new value after the end of the array, increasing its size by 1&lt;br /&gt;
 Numbers[0,1] = null;                      // deletes the first value from the array, decreasing its size by 1&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Types&amp;diff=1682</id>
		<title>Types</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Types&amp;diff=1682"/>
		<updated>2010-10-31T00:07:18Z</updated>

		<summary type="html">&lt;p&gt;Marinus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MethodHeader|bool}}&lt;br /&gt;
*Contains the Boolean constants &#039;&#039;true&#039;&#039; or &#039;&#039;false&#039;&#039;&lt;br /&gt;
*Casting an integer of value 0 to a bool will result in &#039;&#039;false&#039;&#039;, any other value will result in &#039;&#039;true&#039;&#039;.&lt;br /&gt;
 !false = true&lt;br /&gt;
 (bool) 0 = false&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|int}}&lt;br /&gt;
*32 bit integer&lt;br /&gt;
*Range from -2147483647 .. 2147483647&lt;br /&gt;
 Formats&lt;br /&gt;
 100&lt;br /&gt;
 +100&lt;br /&gt;
 -100&lt;br /&gt;
 hex?&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|float}}&lt;br /&gt;
*32 bit floating number&lt;br /&gt;
 Formats&lt;br /&gt;
 1.0&lt;br /&gt;
 1.0f&lt;br /&gt;
 polish notation?&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|object}}&lt;br /&gt;
*&#039;&#039;object&#039;&#039; is a base class which may be used to store references to objects of any class.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{anchor|string}}{{MethodHeader|string}}&lt;br /&gt;
*Strings can be indexed as arrays.&lt;br /&gt;
*Strings support the following escape sequences&lt;br /&gt;
 \r   ?&lt;br /&gt;
 \n   New line&lt;br /&gt;
 \t   Tab character&lt;br /&gt;
 \l   ?&lt;br /&gt;
 \a   ?&lt;br /&gt;
 \b   ?&lt;br /&gt;
 \\   Backslash&lt;br /&gt;
 \&amp;quot;   Double quote mark&lt;br /&gt;
 \&#039;   Single quote mark&lt;br /&gt;
 \0   ?&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MethodHeader|Array Types}}&lt;br /&gt;
*Arrays are indexed lists of any base type or any class type including GameObjects.&lt;br /&gt;
*Arrays are declared using these statements&lt;br /&gt;
 Train[] trains;&lt;br /&gt;
 int[] Numbers = new int[n]; // where &#039;&#039;n&#039;&#039; is the number of items in the array.&lt;br /&gt;
*The keyword &#039;&#039;new&#039;&#039; creates the array but does not initialise any of the members&lt;br /&gt;
 Numbers[3] = 256; // assigns a value to the array. Array indices start at zero&lt;br /&gt;
*Arrays may also be returned by methods&lt;br /&gt;
 Signal[] signals = World.GetSignalList()  // creates an array of signals from a built in method&lt;br /&gt;
 Numbers[Numbers.size()] = 5;              // adds a new value after the end of the array, increasing its size by 1&lt;br /&gt;
 Numbers[0,1] = null;                      // deletes the first value from the array, decreasing its size by 1&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Template:Anchor&amp;diff=1681</id>
		<title>Template:Anchor</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Template:Anchor&amp;diff=1681"/>
		<updated>2010-10-31T00:05:58Z</updated>

		<summary type="html">&lt;p&gt;Marinus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!----&amp;gt;&amp;lt;span id=&amp;quot;{{{1}}}&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Template:Anchor&amp;diff=1680</id>
		<title>Template:Anchor</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Template:Anchor&amp;diff=1680"/>
		<updated>2010-10-31T00:05:05Z</updated>

		<summary type="html">&lt;p&gt;Marinus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!----&amp;gt;&amp;lt;span id=&amp;quot;{{1}}&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Template:Anchor&amp;diff=1679</id>
		<title>Template:Anchor</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Template:Anchor&amp;diff=1679"/>
		<updated>2010-10-31T00:03:51Z</updated>

		<summary type="html">&lt;p&gt;Marinus: Replacing page with &amp;#039;&amp;lt;!----&amp;gt;&amp;lt;span id=&amp;quot;{{anchorencode:{{{1|}}}&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;noinclude&amp;gt;&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!----&amp;gt;&amp;lt;span id=&amp;quot;{{anchorencode:{{{1|}}}&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Template:Anchor&amp;diff=1678</id>
		<title>Template:Anchor</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Template:Anchor&amp;diff=1678"/>
		<updated>2010-10-31T00:00:20Z</updated>

		<summary type="html">&lt;p&gt;Marinus: from http://en.wikipedia.org/wiki/Template:Anchor&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if: {{{1|}}}|&amp;lt;span id=&amp;quot;{{anchorencode:{{{1|}}}}}&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if: {{{2|}}}|&amp;lt;span id=&amp;quot;{{anchorencode:{{{2|}}}}}&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if: {{{3|}}}|&amp;lt;span id=&amp;quot;{{anchorencode:{{{3|}}}}}&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if: {{{4|}}}|&amp;lt;span id=&amp;quot;{{anchorencode:{{{4|}}}}}&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if: {{{5|}}}|&amp;lt;span id=&amp;quot;{{anchorencode:{{{5|}}}}}&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if: {{{6|}}}|&amp;lt;span id=&amp;quot;{{anchorencode:{{{6|}}}}}&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if: {{{7|}}}|&amp;lt;span id=&amp;quot;{{anchorencode:{{{7|}}}}}&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if: {{{8|}}}|&amp;lt;span id=&amp;quot;{{anchorencode:{{{8|}}}}}&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if: {{{9|}}}|&amp;lt;span id=&amp;quot;{{anchorencode:{{{9|}}}}}&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if: {{{10|}}}|&amp;lt;span id=&amp;quot;{{anchorencode:{{{10|}}}}}&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if: {{{11|}}}|&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;[[Template:Anchor]] (or Anchors): too many anchors, maximum is 10.&amp;lt;/span&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;}} }} }} }} }} }} }} }} }} }} }}&amp;lt;noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_Str&amp;diff=1677</id>
		<title>Class Str</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_Str&amp;diff=1677"/>
		<updated>2010-10-30T23:32:31Z</updated>

		<summary type="html">&lt;p&gt;Marinus: added CloneString&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**Str&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Str is a static class providing string utility functions not supported by the native string object. &lt;br /&gt;
*When used in game code these methods must be prefixed &#039;&#039;Str.&#039;&#039; to reference the class.&lt;br /&gt;
*Some of these methods directly amend their parameters rather than returning values via the method.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Left==&lt;br /&gt;
{{MethodHeader|public void Left(string s, int count)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;s&#039;&#039;&#039; = string to be processed.&lt;br /&gt;
*&#039;&#039;&#039;count&#039;&#039;&#039; = count of characters to retain.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 string s = &amp;quot;Afternoon&amp;quot;;&lt;br /&gt;
 Str.TrimLeft(s,5);        // s will now be equal to &amp;quot;After&amp;quot;&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets &#039;&#039;s&#039;&#039; to be a substring of itself consisting of its first &#039;&#039;count&#039;&#039; characters.&lt;br /&gt;
*Method does not return a value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Mid==&lt;br /&gt;
{{MethodHeader|public void Mid(string s, int first, int count)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;s&#039;&#039;&#039; = string to be processed.&lt;br /&gt;
*&#039;&#039;&#039;first&#039;&#039;&#039; = index of first character to retain.&lt;br /&gt;
*&#039;&#039;&#039;count&#039;&#039;&#039; = number of characters to retain.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 string s = &amp;quot;Afternoon&amp;quot;;&lt;br /&gt;
 Str.Mid(s,3,4);           // s will now be equal to &amp;quot;tern&amp;quot;&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets &#039;&#039;s&#039;&#039; to be a substring of itself &#039;&#039;count&#039;&#039; characters long starting with the &#039;&#039;first&#039;&#039; character.&lt;br /&gt;
*Method does not return a value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Right==&lt;br /&gt;
{{MethodHeader|public void Right(string s, int count)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;s&#039;&#039;&#039; = string to be processed.&lt;br /&gt;
*&#039;&#039;&#039;count&#039;&#039;&#039; = number of characters to retain.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 string s = &amp;quot;Afternoon&amp;quot;;&lt;br /&gt;
 Str.Right(s,4);           // s will now be equal to &amp;quot;noon&amp;quot;&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets &#039;&#039;s&#039;&#039; to be a substring of itself composed of the last &#039;&#039;count&#039;&#039; characters.&lt;br /&gt;
*Method does not return a value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ToInt==&lt;br /&gt;
{{MethodHeader|public native int ToInt(string s)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;s&#039;&#039;&#039; = string parameter, which should be a string representation of an integer.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Integer value of string parameter.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int n = Str.ToInt(&amp;quot;1234&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Converts &#039;&#039;s&#039;&#039; to an integer.&lt;br /&gt;
*Method returns 0 if the string cannot be converted.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ToFloat==&lt;br /&gt;
{{MethodHeader|public native float ToFloat(string s)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;s&#039;&#039;&#039; = string parameter, which should be a string representation of a floating point number.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Floating point value.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float length = Str.ToFloat(&amp;quot;1.5&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Converts &#039;&#039;s&#039;&#039; to a floating point number.&lt;br /&gt;
*Method returns 0.0 if the string cannot be converted.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tokens==&lt;br /&gt;
{{MethodHeader|public native string[ ] Tokens(string s, string delimiters)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;s&#039;&#039;&#039; = string to be processed.&lt;br /&gt;
*&#039;&#039;&#039;delimiters&#039;&#039;&#039; = string of characters to use as token boundaries.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Array of string tokens.&lt;br /&gt;
;Syntax&lt;br /&gt;
 string[] sentence = Str.Tokens(&amp;quot;Once upon a time&amp;quot;,&amp;quot;&amp;quot;);     // sentence contains an array of four strings:&lt;br /&gt;
                                                            // [&amp;quot;Once&amp;quot;,&amp;quot;upon&amp;quot;,&amp;quot;a&amp;quot;,&amp;quot;time&amp;quot;].&lt;br /&gt;
 int wordCount = Str.Tokens(&amp;quot;Once upon a time&amp;quot;,&amp;quot;&amp;quot;).size();  // returns 4&lt;br /&gt;
 string firstWord = Str.Tokens(&amp;quot;Once upon a time&amp;quot;,&amp;quot;&amp;quot;)[0];   // returns &amp;quot;Once&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 string kuidStr = &amp;quot;&amp;lt;kuid:1234:5678&amp;gt;&amp;quot;&lt;br /&gt;
 string userID = Str.Tokens(kuidStr,&amp;quot;&amp;lt;:&amp;gt;&amp;quot;)[1];              // returns &amp;quot;1234&amp;quot;&lt;br /&gt;
;Notes&lt;br /&gt;
*Splits a string into an array of tokens using any of the characters in &#039;&#039;delimiters&#039;&#039; as token boundaries.&lt;br /&gt;
*Characters contained within the &#039;&#039;delimiters&#039;&#039; string are never returned.&lt;br /&gt;
*If &#039;&#039;delimiters&#039;&#039; is null or an empty string then white space will be assumed to define the token boundaries.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ToLower==&lt;br /&gt;
{{MethodHeader|public native void ToLower(string s)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;s&#039;&#039;&#039; = string to be processed.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 Str.ToLower(&amp;quot;UPPER CASE STRING&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Converts the string parameter &#039;&#039;s&#039;&#039; to lower case.&lt;br /&gt;
*Method does not return a value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ToUpper==&lt;br /&gt;
{{MethodHeader|public native void ToUpper(string s)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;s&#039;&#039;&#039; = string to be processed.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 Str.ToUpper(&amp;quot;lower case string&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Converts the string parameter &#039;&#039;s&#039;&#039; to upper case.&lt;br /&gt;
*Method does not return a value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==TrimLeft==&lt;br /&gt;
{{MethodHeader|public native void TrimLeft(string s, string trim)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;s&#039;&#039;&#039; = string to be processed.&lt;br /&gt;
*&#039;&#039;&#039;trim&#039;&#039;&#039; = characters to remove&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 Str.TrimLeft(&amp;quot;Once upon a time&amp;quot;,&amp;quot;Once &amp;quot;);      // returns &amp;quot;upon a time&amp;quot;&lt;br /&gt;
 Str.TrimLeft(&amp;quot;      result&amp;quot;,&amp;quot;&amp;quot;);               // returns &amp;quot;result&amp;quot;&lt;br /&gt;
;Notes&lt;br /&gt;
*If &#039;&#039;trim&#039;&#039; is an empty string then all white space will be stripped from the front of the string.&lt;br /&gt;
*Method does not return a value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==TrimRight==&lt;br /&gt;
{{MethodHeader|public native void TrimRight(string s, string trim)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;s&#039;&#039;&#039; = string to be processed.&lt;br /&gt;
*&#039;&#039;&#039;trim&#039;&#039;&#039; = characters to remove&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 Str.TrimRight(&amp;quot;Once upon a time&amp;quot;,&amp;quot; a time&amp;quot;);      // returns &amp;quot;Once upon&amp;quot;&lt;br /&gt;
 Str.TrimRight(&amp;quot;result        &amp;quot;,&amp;quot;&amp;quot;);               // returns &amp;quot;result&lt;br /&gt;
;Notes&lt;br /&gt;
*If &#039;&#039;trim&#039;&#039; is an empty string then all white space will be stripped from the end of the string.&lt;br /&gt;
*Method does not return a value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UnpackInt==&lt;br /&gt;
{{MethodHeader|public native int UnpackInt(string s)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;s&#039;&#039;&#039; = string to be processed.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*First integer value in &#039;&#039;s&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int n = UnpackInt(&amp;quot;21st May 2008&amp;quot;);           // returns 21 and amends &#039;&#039;s&#039;&#039; to &amp;quot;st May 2008&amp;quot; &lt;br /&gt;
;Notes&lt;br /&gt;
*Strips the first integer value found from the string parameter and returns it in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UnpackFloat==&lt;br /&gt;
{{MethodHeader|public native float UnpackFloat(string s)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;s&#039;&#039;&#039; = string to be processed.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*First float value in &#039;&#039;s&#039;&#039;.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float distance = UnpackFloat(&amp;quot;21.5 miles&amp;quot;);   // returns 21.5 and amends &#039;&#039;s&#039;&#039; to &amp;quot; miles&amp;quot;.&lt;br /&gt;
;Notes&lt;br /&gt;
*Strips the first floating point value found from the string parameter and returns it in the method result.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UnpackString==&lt;br /&gt;
{{MethodHeader|public native string UnpackString(string s)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;s&#039;&#039;&#039; = string to be processed.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*First string in &#039;&#039;s&#039;&#039;, excluding any leading white space.&lt;br /&gt;
;Syntax&lt;br /&gt;
 string s = &amp;quot;Once upon a time&amp;quot;;&lt;br /&gt;
 string firstWord = UnpackString(s);     // returns &amp;quot;Once&amp;quot;, s becomes &amp;quot; upon a time&amp;quot;&lt;br /&gt;
 string secondWord = UnpackString(s);    // returns &amp;quot;upon&amp;quot;, s becomes &amp;quot; a time&amp;quot;&lt;br /&gt;
 string thirdWord = UnpackString(s);     // returns &amp;quot;a&amp;quot;,    s becomes &amp;quot; time&amp;quot;&lt;br /&gt;
 string fourthWord = UnpackString(s);    // returns &amp;quot;time&amp;quot;, s becomes &amp;quot;&amp;quot;&lt;br /&gt;
;Notes&lt;br /&gt;
*Strips the first word from the string parameter (using white space for word separation) and returns it in the method result. &lt;br /&gt;
*Any leading white space is removed from the string before parsing.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CloneString==&lt;br /&gt;
{{MethodHeader|public string CloneString(string s)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;s&#039;&#039;&#039; = The string to clone.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*string - A new string in the current gamescript context which has contents that exactly match the original string.&lt;br /&gt;
;Syntax&lt;br /&gt;
 string original=&amp;quot;Hello World!&amp;quot;&lt;br /&gt;
 string copy;&lt;br /&gt;
 copy=Str.CloneString(original);&lt;br /&gt;
;Notes&lt;br /&gt;
*CloneString() creates a copy of the string passed. &lt;br /&gt;
*Ordinarily &#039;copying&#039; a string will just create a new object that references the old string. This is not allowed across different contexts.&lt;br /&gt;
*CloneString() creates a new string for use in the current context.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
&lt;br /&gt;
[[Class TrainUtil#AlreadyThereStr|TrainUtil.AlreadyThereStr()]]&lt;br /&gt;
&lt;br /&gt;
[[Class TrainUtil#CompareStrLists|TrainUtil.CompareStrLists()]]&lt;br /&gt;
&lt;br /&gt;
[[Class TrainUtil#GetUpTo|TrainUtil.GetUpTo()]]&lt;br /&gt;
&lt;br /&gt;
[[Class TrainUtil#HasPrefix|TrainUtil.HasPrefix()]]&lt;br /&gt;
&lt;br /&gt;
[[Class TrainUtil#HasSufix|TrainUtil.HasSufix()]] &#039;&#039;(sic)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Class TrainUtil#StrSubst|TrainUtil.StrSubst()]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_GameplayMenu&amp;diff=1676</id>
		<title>Class GameplayMenu</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_GameplayMenu&amp;diff=1676"/>
		<updated>2010-10-30T23:01:31Z</updated>

		<summary type="html">&lt;p&gt;Marinus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]]&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
*****GameplayMenu&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* A class that implements an in-game Menu like the Routes or Scenario Menu.&lt;br /&gt;
* This script is running in the [[New TrainzScript Features#Global script context|global script context]]&lt;br /&gt;
* Used with [[KIND Gameplaymenu]] assets&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Menu Modes===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int MENUMODE_NONE = 0||Not visible.&lt;br /&gt;
|-&lt;br /&gt;
|public define int MENUMODE_BUTTON = 1;||Visible as a button on the gameplay menu.&lt;br /&gt;
|-&lt;br /&gt;
|public define int MENUMODE_MENU = 2;||Visible as a full-screen menu.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|&amp;lt;b&amp;gt; Browser m_browser&amp;lt;/b&amp;gt;||An internal reference to the embedded browser object, which displays this game menu&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
{{MethodHeader|public void SetGameplayMenuMode(Browser browser, int menuMode)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;browser &#039;&#039;&#039; = The Browser control which is used to visualise this GameplayMenu.&lt;br /&gt;
*&#039;&#039;&#039;menuMode&#039;&#039;&#039; = One of the [[#Menu Modes|MENUMODE_*]] defines, indicating which mode we are switching to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Called whenever the menumode of this GameplayMenu is changed.&lt;br /&gt;
*Change the appearance of this menu based on menuMode by changing the HTML code of the embedded browser object [[#Members|m_browser]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public native void CloseGameplayMenu(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*none&lt;br /&gt;
;Notes&lt;br /&gt;
*This function causes this gameplay menu to be closed, returning the user to the game main menu.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public void UserRequestGoBack(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*none&lt;br /&gt;
;Notes&lt;br /&gt;
*Called whenever the user requests a &amp;quot;go back&amp;quot; action. &lt;br /&gt;
*If the user has navigated to some form of &amp;quot;sub menu&amp;quot;, this should return them to the main level of this gameplay menu. &lt;br /&gt;
*If at the main level, this should close the gameplay menu and return to the game main menu.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public void TADRequestRefresh(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&lt;br /&gt;
;Returned Value&lt;br /&gt;
*&lt;br /&gt;
;Notes&lt;br /&gt;
*Called on a fullscreen menu when the TAD is modified.&lt;br /&gt;
*Dynamic menus based on lists of assets may wish to refresh their view of the world at this time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverQuickDrive(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to QuickDrive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with the supplied map&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the session to Drive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with a session&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverScenario(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the scenario to Drive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with a scenario&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverSavedSession(string theSavedSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
* do not use&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorNew()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a new map.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorMap(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a map.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorMapNewSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a map, to start a new session.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the session to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a session.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadRailyard(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the vehicle to select in Railyard. May be null.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Railyard module, optionally displaying the specified vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native Soup GetSavedSessionInfo()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&lt;br /&gt;
;Returned Value&lt;br /&gt;
*&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteMap(KUID theMap)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theMap&#039;&#039;&#039; = the KUID of the route to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific map, and all sessions that use it&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteSession(KUID theSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theSession&#039;&#039;&#039; = the session to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific session&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteScenario(KUID theScenario)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theScenario&#039;&#039;&#039; = the scenario to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific scenario&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteSavedSession(string theSavedSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
* N/A&lt;br /&gt;
;Returned Value&lt;br /&gt;
* N/A&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_GameplayMenu&amp;diff=1675</id>
		<title>Class GameplayMenu</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_GameplayMenu&amp;diff=1675"/>
		<updated>2010-10-30T23:00:00Z</updated>

		<summary type="html">&lt;p&gt;Marinus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]]&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
*****GameplayMenu&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* A class that implements an in-game Menu like the Routes or Scenario Menu.&lt;br /&gt;
* This script is running in the [[New TrainzScript Features#Global script context|global script context]]&lt;br /&gt;
* Used with [[kind gameplaymenu]] assets&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Menu Modes===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int MENUMODE_NONE = 0||Not visible.&lt;br /&gt;
|-&lt;br /&gt;
|public define int MENUMODE_BUTTON = 1;||Visible as a button on the gameplay menu.&lt;br /&gt;
|-&lt;br /&gt;
|public define int MENUMODE_MENU = 2;||Visible as a full-screen menu.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|&amp;lt;b&amp;gt; Browser m_browser&amp;lt;/b&amp;gt;||An internal reference to the embedded browser object, which displays this game menu&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
{{MethodHeader|public void SetGameplayMenuMode(Browser browser, int menuMode)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;browser &#039;&#039;&#039; = The Browser control which is used to visualise this GameplayMenu.&lt;br /&gt;
*&#039;&#039;&#039;menuMode&#039;&#039;&#039; = One of the [[#Menu Modes|MENUMODE_*]] defines, indicating which mode we are switching to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Called whenever the menumode of this GameplayMenu is changed.&lt;br /&gt;
*Change the appearance of this menu based on menuMode by changing the HTML code of the embedded browser object [[#Members|m_browser]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public native void CloseGameplayMenu(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*none&lt;br /&gt;
;Notes&lt;br /&gt;
*This function causes this gameplay menu to be closed, returning the user to the game main menu.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public void UserRequestGoBack(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*none&lt;br /&gt;
;Notes&lt;br /&gt;
*Called whenever the user requests a &amp;quot;go back&amp;quot; action. &lt;br /&gt;
*If the user has navigated to some form of &amp;quot;sub menu&amp;quot;, this should return them to the main level of this gameplay menu. &lt;br /&gt;
*If at the main level, this should close the gameplay menu and return to the game main menu.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public void TADRequestRefresh(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&lt;br /&gt;
;Returned Value&lt;br /&gt;
*&lt;br /&gt;
;Notes&lt;br /&gt;
*Called on a fullscreen menu when the TAD is modified.&lt;br /&gt;
*Dynamic menus based on lists of assets may wish to refresh their view of the world at this time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverQuickDrive(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to QuickDrive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with the supplied map&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the session to Drive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with a session&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverScenario(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the scenario to Drive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with a scenario&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverSavedSession(string theSavedSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
* do not use&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorNew()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a new map.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorMap(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a map.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorMapNewSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a map, to start a new session.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the session to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a session.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadRailyard(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the vehicle to select in Railyard. May be null.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Railyard module, optionally displaying the specified vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native Soup GetSavedSessionInfo()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&lt;br /&gt;
;Returned Value&lt;br /&gt;
*&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteMap(KUID theMap)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theMap&#039;&#039;&#039; = the KUID of the route to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific map, and all sessions that use it&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteSession(KUID theSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theSession&#039;&#039;&#039; = the session to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific session&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteScenario(KUID theScenario)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theScenario&#039;&#039;&#039; = the scenario to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific scenario&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteSavedSession(string theSavedSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
* N/A&lt;br /&gt;
;Returned Value&lt;br /&gt;
* N/A&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=TrainzScript_Library_Reference&amp;diff=1674</id>
		<title>TrainzScript Library Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=TrainzScript_Library_Reference&amp;diff=1674"/>
		<updated>2010-10-30T22:58:59Z</updated>

		<summary type="html">&lt;p&gt;Marinus: added gameplaymenu reference&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following is a list of all &amp;quot;common&amp;quot; classes provided by Auran for use with the Trainz game runtime environment. Some of these classes may not be available from other runtime environments. Please see the [[TrainzScript Language Reference]] for a list of the &amp;quot;core&amp;quot; TrainzScript classes that are present in all runtime environments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Classes marked with an asterisk have no parent class.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[[class GSObject|GSObject]] *&lt;br /&gt;
**[[class Asset|Asset]]&lt;br /&gt;
**[[class GameObject|GameObject]]&lt;br /&gt;
***[[class Browser|Browser]]&lt;br /&gt;
***[[class Train|Train]]&lt;br /&gt;
***[[class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
****[[class GameplayMenu|GameplayMenu]]&lt;br /&gt;
***[[class PropertyObject|PropertyObject]] *&lt;br /&gt;
****[[class MeshObject|MeshObject]]&lt;br /&gt;
*****[[class Bogey|Bogey]]&lt;br /&gt;
*****[[class Cabin|Cabin]]&lt;br /&gt;
*****[[class MapObject|MapObject]]&lt;br /&gt;
******[[class SceneryWithTrack|SceneryWithTrack]]&lt;br /&gt;
*******[[class Buildable|Buildable]]&lt;br /&gt;
********[[Class Industry|Industry]]&lt;br /&gt;
*******[[class Crossing|Crossing]]&lt;br /&gt;
*******[[class Turntable|Turntable]]&lt;br /&gt;
******[[class JunctionBase|JunctionBase]] *&lt;br /&gt;
******[[class Trackside|Trackside]]&lt;br /&gt;
*******[[class Junction|Junction]]&lt;br /&gt;
*******[[class Signal|Signal]]&lt;br /&gt;
*******[[class Trackmark|Trackmark]]&lt;br /&gt;
*******[[class Trigger|Trigger]]&lt;br /&gt;
*******[[class Vehicle|Vehicle]]&lt;br /&gt;
********[[class Locomotive|Locomotive]]&lt;br /&gt;
****[[class Library|Library]]&lt;br /&gt;
**[[class KUID|KUID]]&lt;br /&gt;
**[[class Soup|Soup]]&lt;br /&gt;
**[[class StringTable|StringTable]]&lt;br /&gt;
*[[class Constructors|Constructors]] *&lt;br /&gt;
*[[class GSTrackSearch|GSTrackSearch]] *&lt;br /&gt;
*[[Class Interface|Interface]] *&lt;br /&gt;
*[[class Math|Math]] *&lt;br /&gt;
*[[class Router|Router]] *&lt;br /&gt;
*[[class Str|Str]] *&lt;br /&gt;
*[[class TrainUtil|TrainUtil]] *&lt;br /&gt;
*[[class World|World]] *&lt;br /&gt;
*[[class World1|World1]] *&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Categories=&lt;br /&gt;
[[Category:TrainzScript]]&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_GameplayMenu&amp;diff=1673</id>
		<title>Class GameplayMenu</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_GameplayMenu&amp;diff=1673"/>
		<updated>2010-10-30T22:57:05Z</updated>

		<summary type="html">&lt;p&gt;Marinus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]]&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
*****GameplayMenu&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* A class that implements a in-game Menu like the Routes or Scenario Menu.&lt;br /&gt;
* This script is running in the [[New TrainzScript Features#Global script context|global script context]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Menu Modes===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int MENUMODE_NONE = 0||Not visible.&lt;br /&gt;
|-&lt;br /&gt;
|public define int MENUMODE_BUTTON = 1;||Visible as a button on the gameplay menu.&lt;br /&gt;
|-&lt;br /&gt;
|public define int MENUMODE_MENU = 2;||Visible as a full-screen menu.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|&amp;lt;b&amp;gt; Browser m_browser&amp;lt;/b&amp;gt;||An internal reference to the embedded browser object, which displays this game menu&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
{{MethodHeader|public void SetGameplayMenuMode(Browser browser, int menuMode)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;browser &#039;&#039;&#039; = The Browser control which is used to visualise this GameplayMenu.&lt;br /&gt;
*&#039;&#039;&#039;menuMode&#039;&#039;&#039; = One of the [[#Menu Modes|MENUMODE_*]] defines, indicating which mode we are switching to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Called whenever the menumode of this GameplayMenu is changed.&lt;br /&gt;
*Change the appearance of this menu based on menuMode by changing the HTML code of the embedded browser object [[#Members|m_browser]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public native void CloseGameplayMenu(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*none&lt;br /&gt;
;Notes&lt;br /&gt;
*This function causes this gameplay menu to be closed, returning the user to the game main menu.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public void UserRequestGoBack(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*none&lt;br /&gt;
;Notes&lt;br /&gt;
*Called whenever the user requests a &amp;quot;go back&amp;quot; action. &lt;br /&gt;
*If the user has navigated to some form of &amp;quot;sub menu&amp;quot;, this should return them to the main level of this gameplay menu. &lt;br /&gt;
*If at the main level, this should close the gameplay menu and return to the game main menu.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public void TADRequestRefresh(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&lt;br /&gt;
;Returned Value&lt;br /&gt;
*&lt;br /&gt;
;Notes&lt;br /&gt;
*Called on a fullscreen menu when the TAD is modified.&lt;br /&gt;
*Dynamic menus based on lists of assets may wish to refresh their view of the world at this time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverQuickDrive(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to QuickDrive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with the supplied map&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the session to Drive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with a session&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverScenario(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the scenario to Drive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with a scenario&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverSavedSession(string theSavedSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
* do not use&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorNew()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a new map.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorMap(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a map.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorMapNewSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a map, to start a new session.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the session to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a session.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadRailyard(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the vehicle to select in Railyard. May be null.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Railyard module, optionally displaying the specified vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native Soup GetSavedSessionInfo()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&lt;br /&gt;
;Returned Value&lt;br /&gt;
*&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteMap(KUID theMap)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theMap&#039;&#039;&#039; = the KUID of the route to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific map, and all sessions that use it&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteSession(KUID theSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theSession&#039;&#039;&#039; = the session to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific session&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteScenario(KUID theScenario)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theScenario&#039;&#039;&#039; = the scenario to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific scenario&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteSavedSession(string theSavedSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
* N/A&lt;br /&gt;
;Returned Value&lt;br /&gt;
* N/A&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Talk:Class_StringTable&amp;diff=1614</id>
		<title>Talk:Class StringTable</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Talk:Class_StringTable&amp;diff=1614"/>
		<updated>2010-10-18T08:53:51Z</updated>

		<summary type="html">&lt;p&gt;Marinus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The initial version of this page, and also the comments in stringtable.gs indicate &#039;%&#039; as the meta symbol for replacement variables, but instead it should be &#039;$&#039;&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Talk:Class_StringTable&amp;diff=1611</id>
		<title>Talk:Class StringTable</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Talk:Class_StringTable&amp;diff=1611"/>
		<updated>2010-10-18T08:52:43Z</updated>

		<summary type="html">&lt;p&gt;Marinus: New page: The initial config, and also the comments in stringtable.gs indicate &amp;#039;%&amp;#039; as the meta symbol for replacement variables, but instead it should be &amp;#039;$&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The initial config, and also the comments in stringtable.gs indicate &#039;%&#039; as the meta symbol for replacement variables, but instead it should be &#039;$&#039;&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_StringTable&amp;diff=1608</id>
		<title>Class StringTable</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_StringTable&amp;diff=1608"/>
		<updated>2010-10-18T08:51:29Z</updated>

		<summary type="html">&lt;p&gt;Marinus: Replaced &amp;#039;%&amp;#039; with the correct symbo &amp;#039;$&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]]&lt;br /&gt;
***StringTable&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The StringTable class provides access to an asset&#039;s string table.&lt;br /&gt;
*Any asset can have a string table container in its config.txt file, defined in the following format:&lt;br /&gt;
 string-table {&lt;br /&gt;
    Industry_Title          &amp;quot;Packing Plant&amp;quot;&lt;br /&gt;
    Industry_Description    &amp;quot;$0 Packing Plant&amp;quot;&lt;br /&gt;
    Announcement            &amp;quot;The train at platform $0 is the $1 for $2, $3 and $4&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*A string can have up to 10 parameters in the range of $0..$9.&lt;br /&gt;
*A string table parameter is identified by the percentage character &#039;$&#039; followed by the parameter number.&lt;br /&gt;
*The methods in this class allow a string to be retrieved such that its parameters are substituted with the desired string.&lt;br /&gt;
*String tables can be used to store segments of HTML code that can be reused with the substituted parameters to define a table for example.&lt;br /&gt;
*The Browser class also supports the use of string parameters through its [[Class Browser|Browser.SetParam()]] method.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ClearParams===&lt;br /&gt;
{{MethodHeader|public native void ClearParams(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 table.ClearParams();&lt;br /&gt;
;Notes&lt;br /&gt;
*Resets the parameter list for the referenced StringTable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLanguage===&lt;br /&gt;
{{MethodHeader|public native string GetLanguage(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current language version of Trainz.&lt;br /&gt;
;Syntax&lt;br /&gt;
 string language = GetLanguage();&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetString===&lt;br /&gt;
{{MethodHeader|public native string GetString(string s)&amp;lt;br&amp;gt;public native string GetString0(string s)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;s&#039;&#039;&#039; = Name of the StringTable value to retrieve.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Value of the named item.&lt;br /&gt;
;Syntax&lt;br /&gt;
 &amp;lt;font color=#808080&amp;gt;// Industry_Description &amp;quot;Packing Plant&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 description = table.GetString(&amp;quot;Industry_Description&amp;quot;); // returns &amp;quot;Packing Plant&amp;quot;&lt;br /&gt;
;Notes&lt;br /&gt;
*If the named value is not present an empty string is returned.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetString#===&lt;br /&gt;
{{MethodHeader|public string GetString1(string s, string p0)&amp;lt;br&amp;gt;public string GetString10(string s, string p0,.., string p9)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;s&#039;&#039;&#039; = Name of the StringTable value to retrieve.&lt;br /&gt;
*&#039;&#039;&#039;p0..p9&#039;&#039;&#039; = Replaceable parameters identified by &amp;quot;$0&amp;quot;..&amp;quot;$9&amp;quot;.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 &amp;lt;font color=#808080&amp;gt;// Industry_Description &amp;quot;$0 Packing Plant&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 description = table.GetString1(&amp;quot;Industry_Description&amp;quot;,&amp;quot;Wagga Wagga&amp;quot;); // returns &amp;quot;Wagga Wagga Packing Plant&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=#808080&amp;gt;// Announcement &amp;quot;The train at platform $0 is the $1 for $2, $3 and $4&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 description = table.GetString5(&amp;quot;Announcement&amp;quot;,&amp;quot;1&amp;quot;,&amp;quot;8:15&amp;quot;,&amp;quot;Chelmsford&amp;quot;,&amp;quot;Witham&amp;quot;,&amp;quot;Colchester&amp;quot;);&lt;br /&gt;
 // returns &amp;quot;The train at platform 1 is the 8:15 for Chelmsford, Witham and Colchester&amp;quot;&lt;br /&gt;
;Notes&lt;br /&gt;
*A series of methods to retrieve a named string with substitution of up to 10 replaceable parameters.&lt;br /&gt;
*The parameters are set up as placeholders within the StringTable using a percentage sign as an escape character.&lt;br /&gt;
*Just to keep things simple function name counting starts at 1 and parameter indexing starts at zero.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetParam===&lt;br /&gt;
{{MethodHeader|public native void SetParam(int param, string text)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;param&#039;&#039;&#039; = Index of parameter to define.&lt;br /&gt;
*&#039;&#039;&#039;text&#039;&#039;&#039; = String value to assign to the defined parameter.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 &amp;lt;font color=#808080&amp;gt;// Industry_Description &amp;quot;$0 Packing Plant&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=#808080&amp;gt;// Station_Description &amp;quot;$0 Station&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 table.SetParam(1,&amp;quot;Fremantle&amp;quot;);&lt;br /&gt;
 table.GetString(&amp;quot;Industry_Description&amp;quot;);  // returns &amp;quot;Fremantle Packing Plant&amp;quot;&lt;br /&gt;
 table.GetString(&amp;quot;Station_Description&amp;quot;);   // returns &amp;quot;Fremantle Station&amp;quot;&lt;br /&gt;
;Notes&lt;br /&gt;
*The value assigned to the parameter remains in place until amended or until a call to ClearParams() is made.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_GameplayMenu&amp;diff=1531</id>
		<title>Class GameplayMenu</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_GameplayMenu&amp;diff=1531"/>
		<updated>2010-10-15T15:05:38Z</updated>

		<summary type="html">&lt;p&gt;Marinus: /* Methods */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]]&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
*****[[Class Library| Library]]&lt;br /&gt;
******GameplayMenu&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* A class that implements a in-game Menu like the Routes or Scenario Menu.&lt;br /&gt;
* This script is running in the [[New TrainzScript Features#Global script context|global script context]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Menu Modes===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int MENUMODE_NONE = 0||Not visible.&lt;br /&gt;
|-&lt;br /&gt;
|public define int MENUMODE_BUTTON = 1;||Visible as a button on the gameplay menu.&lt;br /&gt;
|-&lt;br /&gt;
|public define int MENUMODE_MENU = 2;||Visible as a full-screen menu.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|&amp;lt;b&amp;gt; Browser m_browser&amp;lt;/b&amp;gt;||An internal reference to the embedded browser object, which displays this game menu&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
{{MethodHeader|public void SetGameplayMenuMode(Browser browser, int menuMode)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;browser &#039;&#039;&#039; = The Browser control which is used to visualise this GameplayMenu.&lt;br /&gt;
*&#039;&#039;&#039;menuMode&#039;&#039;&#039; = One of the [[#Menu Modes|MENUMODE_*]] defines, indicating which mode we are switching to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Called whenever the menumode of this GameplayMenu is changed.&lt;br /&gt;
*Change the appearance of this menu based on menuMode by changing the HTML code of the embedded browser object [[#Members|m_browser]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public native void CloseGameplayMenu(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*none&lt;br /&gt;
;Notes&lt;br /&gt;
*This function causes this gameplay menu to be closed, returning the user to the game main menu.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public void UserRequestGoBack(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*none&lt;br /&gt;
;Notes&lt;br /&gt;
*Called whenever the user requests a &amp;quot;go back&amp;quot; action. &lt;br /&gt;
*If the user has navigated to some form of &amp;quot;sub menu&amp;quot;, this should return them to the main level of this gameplay menu. &lt;br /&gt;
*If at the main level, this should close the gameplay menu and return to the game main menu.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public void TADRequestRefresh(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&lt;br /&gt;
;Returned Value&lt;br /&gt;
*&lt;br /&gt;
;Notes&lt;br /&gt;
*Called on a fullscreen menu when the TAD is modified.&lt;br /&gt;
*Dynamic menus based on lists of assets may wish to refresh their view of the world at this time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverQuickDrive(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to QuickDrive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with the supplied map&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the session to Drive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with a session&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverScenario(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the scenario to Drive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with a scenario&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverSavedSession(string theSavedSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
* do not use&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorNew()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a new map.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorMap(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a map.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorMapNewSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a map, to start a new session.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the session to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a session.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadRailyard(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the vehicle to select in Railyard. May be null.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Railyard module, optionally displaying the specified vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native Soup GetSavedSessionInfo()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&lt;br /&gt;
;Returned Value&lt;br /&gt;
*&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteMap(KUID theMap)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theMap&#039;&#039;&#039; = the KUID of the route to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific map, and all sessions that use it&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteSession(KUID theSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theSession&#039;&#039;&#039; = the session to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific session&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteScenario(KUID theScenario)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theScenario&#039;&#039;&#039; = the scenario to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific scenario&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteSavedSession(string theSavedSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
* N/A&lt;br /&gt;
;Returned Value&lt;br /&gt;
* N/A&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_GameplayMenu&amp;diff=1530</id>
		<title>Class GameplayMenu</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_GameplayMenu&amp;diff=1530"/>
		<updated>2010-10-15T15:05:09Z</updated>

		<summary type="html">&lt;p&gt;Marinus: /* Methods */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]]&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
*****[[Class Library| Library]]&lt;br /&gt;
******GameplayMenu&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* A class that implements a in-game Menu like the Routes or Scenario Menu.&lt;br /&gt;
* This script is running in the [[New TrainzScript Features#Global script context|global script context]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Menu Modes===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int MENUMODE_NONE = 0||Not visible.&lt;br /&gt;
|-&lt;br /&gt;
|public define int MENUMODE_BUTTON = 1;||Visible as a button on the gameplay menu.&lt;br /&gt;
|-&lt;br /&gt;
|public define int MENUMODE_MENU = 2;||Visible as a full-screen menu.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|&amp;lt;b&amp;gt; Browser m_browser&amp;lt;/b&amp;gt;||An internal reference to the embedded browser object, which displays this game menu&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
{{MethodHeader|public void SetGameplayMenuMode(Browser browser, int menuMode)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;browser &#039;&#039;&#039; = The Browser control which is used to visualise this GameplayMenu.&lt;br /&gt;
*&#039;&#039;&#039;menuMode&#039;&#039;&#039; = One of the [[#Menu Modes|MENUMODE_*]] defines, indicating which mode we are switching to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Called whenever the menumode of this GameplayMenu is changed.&lt;br /&gt;
*Change the appearance of this menu based on menuMode by changing the HTML code of the embedded browser object [[Members|m_browser]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public native void CloseGameplayMenu(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*none&lt;br /&gt;
;Notes&lt;br /&gt;
*This function causes this gameplay menu to be closed, returning the user to the game main menu.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public void UserRequestGoBack(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*none&lt;br /&gt;
;Notes&lt;br /&gt;
*Called whenever the user requests a &amp;quot;go back&amp;quot; action. &lt;br /&gt;
*If the user has navigated to some form of &amp;quot;sub menu&amp;quot;, this should return them to the main level of this gameplay menu. &lt;br /&gt;
*If at the main level, this should close the gameplay menu and return to the game main menu.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public void TADRequestRefresh(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&lt;br /&gt;
;Returned Value&lt;br /&gt;
*&lt;br /&gt;
;Notes&lt;br /&gt;
*Called on a fullscreen menu when the TAD is modified.&lt;br /&gt;
*Dynamic menus based on lists of assets may wish to refresh their view of the world at this time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverQuickDrive(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to QuickDrive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with the supplied map&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the session to Drive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with a session&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverScenario(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the scenario to Drive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with a scenario&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverSavedSession(string theSavedSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
* do not use&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorNew()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a new map.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorMap(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a map.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorMapNewSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a map, to start a new session.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the session to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a session.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadRailyard(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the vehicle to select in Railyard. May be null.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Railyard module, optionally displaying the specified vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native Soup GetSavedSessionInfo()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&lt;br /&gt;
;Returned Value&lt;br /&gt;
*&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteMap(KUID theMap)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theMap&#039;&#039;&#039; = the KUID of the route to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific map, and all sessions that use it&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteSession(KUID theSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theSession&#039;&#039;&#039; = the session to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific session&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteScenario(KUID theScenario)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theScenario&#039;&#039;&#039; = the scenario to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific scenario&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteSavedSession(string theSavedSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
* N/A&lt;br /&gt;
;Returned Value&lt;br /&gt;
* N/A&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_GameplayMenu&amp;diff=1529</id>
		<title>Class GameplayMenu</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_GameplayMenu&amp;diff=1529"/>
		<updated>2010-10-15T15:04:09Z</updated>

		<summary type="html">&lt;p&gt;Marinus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]]&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
*****[[Class Library| Library]]&lt;br /&gt;
******GameplayMenu&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* A class that implements a in-game Menu like the Routes or Scenario Menu.&lt;br /&gt;
* This script is running in the [[New TrainzScript Features#Global script context|global script context]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Menu Modes===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int MENUMODE_NONE = 0||Not visible.&lt;br /&gt;
|-&lt;br /&gt;
|public define int MENUMODE_BUTTON = 1;||Visible as a button on the gameplay menu.&lt;br /&gt;
|-&lt;br /&gt;
|public define int MENUMODE_MENU = 2;||Visible as a full-screen menu.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|&amp;lt;b&amp;gt; Browser m_browser&amp;lt;/b&amp;gt;||An internal reference to the embedded browser object, which displays this game menu&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
{{MethodHeader|public void SetGameplayMenuMode(Browser browser, int menuMode)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;browser &#039;&#039;&#039; = The Browser control which is used to visualise this GameplayMenu.&lt;br /&gt;
*&#039;&#039;&#039;menuMode&#039;&#039;&#039; = One of the [[#Menu Modes|MENUMODE_*]] defines, indicating which mode we are switching to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Called whenever the menumode of this GameplayMenu is changed.&lt;br /&gt;
*Change the appearance of this menu based on menuMode by changing the HTML code of the embedded browser object m_browser&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public native void CloseGameplayMenu(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*none&lt;br /&gt;
;Notes&lt;br /&gt;
*This function causes this gameplay menu to be closed, returning the user to the game main menu.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public void UserRequestGoBack(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*none&lt;br /&gt;
;Notes&lt;br /&gt;
*Called whenever the user requests a &amp;quot;go back&amp;quot; action. &lt;br /&gt;
*If the user has navigated to some form of &amp;quot;sub menu&amp;quot;, this should return them to the main level of this gameplay menu. &lt;br /&gt;
*If at the main level, this should close the gameplay menu and return to the game main menu.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public void TADRequestRefresh(void)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&lt;br /&gt;
;Returned Value&lt;br /&gt;
*&lt;br /&gt;
;Notes&lt;br /&gt;
*Called on a fullscreen menu when the TAD is modified.&lt;br /&gt;
*Dynamic menus based on lists of assets may wish to refresh their view of the world at this time.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverQuickDrive(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to QuickDrive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with the supplied map&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the session to Drive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with a session&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverScenario(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the scenario to Drive.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Driver module with a scenario&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadDriverSavedSession(string theSavedSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
* do not use&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorNew()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*none&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a new map.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorMap(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a map.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorMapNewSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the map to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a map, to start a new session.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadSurveyorSession(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the session to load.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Surveyor module with a session.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool LoadRailyard(KUID kuid)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;kuid&#039;&#039;&#039; = the KUID of the vehicle to select in Railyard. May be null.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True on success. False if something failed.&lt;br /&gt;
;Notes&lt;br /&gt;
*Loads the Railyard module, optionally displaying the specified vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native Soup GetSavedSessionInfo()}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&lt;br /&gt;
;Returned Value&lt;br /&gt;
*&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteMap(KUID theMap)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theMap&#039;&#039;&#039; = the KUID of the route to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific map, and all sessions that use it&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteSession(KUID theSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theSession&#039;&#039;&#039; = the session to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific session&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteScenario(KUID theScenario)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;theScenario&#039;&#039;&#039; = the scenario to delete&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if successfully deleted.&lt;br /&gt;
;Notes&lt;br /&gt;
*Deletes a specific scenario&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|native bool DeleteSavedSession(string theSavedSession)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
* N/A&lt;br /&gt;
;Returned Value&lt;br /&gt;
* N/A&lt;br /&gt;
;Notes&lt;br /&gt;
*INTERNAL USE ONLY. DO NOT USE! This function will not be maintained in future versions of Trainz.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_GameplayMenu&amp;diff=1528</id>
		<title>Class GameplayMenu</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_GameplayMenu&amp;diff=1528"/>
		<updated>2010-10-15T13:47:43Z</updated>

		<summary type="html">&lt;p&gt;Marinus: New page: *API Hierarchy **GSObject ***GameObject ****TrainzGameObject *****[[Class Library| Li...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]]&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
*****[[Class Library| Library]]&lt;br /&gt;
******GameplayMenu&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* A class that implements a in-game Menu like the Routes or Scenario Menu.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Menu Modes===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int MENUMODE_NONE = 0||Not visible.&lt;br /&gt;
|-&lt;br /&gt;
|public define int MENUMODE_BUTTON = 1;||Visible as a button on the gameplay menu.&lt;br /&gt;
|-&lt;br /&gt;
|public define int MENUMODE_MENU = 2;||Visible as a full-screen menu.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
{{MethodHeader|public void SetGameplayMenuMode(Browser browser, int menuMode)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;browser &#039;&#039;&#039; =The Browser control which is used to visualise this GameplayMenu.&lt;br /&gt;
*&#039;&#039;&#039;menuMode&#039;&#039;&#039; = One of the MENUMODE_* defines, indicating which mode we are switching to.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Notes&lt;br /&gt;
*Called whenever the menumode of this GameplayMenu is changed.&lt;br /&gt;
*Change the appearance of this menu based on menuMode by changing the HTML code of the embedded browser object m_browser&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{MethodHeader|public native void CloseGameplayMenu(void)}}&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=KIND_Gameplaymenu&amp;diff=1527</id>
		<title>KIND Gameplaymenu</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=KIND_Gameplaymenu&amp;diff=1527"/>
		<updated>2010-10-15T13:29:28Z</updated>

		<summary type="html">&lt;p&gt;Marinus: New page: KIND Gameplaymenu provides the possibility to create a user defined gameplay menu, similar to the built-in Routes or Scenarios menu. The actual menu must be implemented as a [[Class Ga...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[KIND Gameplaymenu]] provides the possibility to create a user defined gameplay menu, similar to the built-in Routes or Scenarios menu. The actual menu must be implemented as a [[Class GameplayMenu|GameplayMenu]] script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==KIND Hierarchy==&lt;br /&gt;
===Parent Classes===&lt;br /&gt;
* &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
===Child Classes===&lt;br /&gt;
* &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Builtins=&lt;br /&gt;
The built-in [[KIND Gameplaymenu]] assets include:&lt;br /&gt;
&lt;br /&gt;
* Routes Menu,&amp;lt;kuid:447264:1006&amp;gt;&lt;br /&gt;
* Tutorials Menu,&amp;lt;kuid:447264:1007&amp;gt;&lt;br /&gt;
* Railyard Menu,&amp;lt;kuid:447264:1012&amp;gt;&lt;br /&gt;
* Savegames Menu,&amp;lt;kuid:447264:1015&amp;gt;&lt;br /&gt;
* Scenarios Menu,&amp;lt;kuid:447264:1016&amp;gt;&lt;br /&gt;
* Updates Menu,&amp;lt;kuid:447264:1020&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Asset KIND]]&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=TrainzScript_User_Interface&amp;diff=1526</id>
		<title>TrainzScript User Interface</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=TrainzScript_User_Interface&amp;diff=1526"/>
		<updated>2010-10-15T13:12:59Z</updated>

		<summary type="html">&lt;p&gt;Marinus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TrainzScript objects provide user interfaces through various techniques. Each technique is appropriate to a different set of data and at a different place in the game environment.&lt;br /&gt;
&lt;br /&gt;
*Driver HUDs.&lt;br /&gt;
*Custom Windows.&lt;br /&gt;
*Surveyor Rules Interface.&lt;br /&gt;
*Surveyor Object Property Editor.&lt;br /&gt;
*Game Menus.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most interface techniques use the Trainz [[MiniBrowser]] as the underlying display technology and Auran&#039;s special live: protocol for sensing user input such as clicking on a button.&lt;/div&gt;</summary>
		<author><name>Marinus</name></author>
	</entry>
</feed>