Class Menu

From TrainzOnline
Revision as of 09:49, 23 March 2018 by Callavsg (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


A menu is a list of items that can selected by the user with the mouse cursor. Menus can be constructed in hierarchies so a menu item could open up a sub-menu of its own. Sub-menus can also have sub-menus of their own as well. Menu items can have messages sent when clicked on.


Methods

public native void InitialiseAsMapObjectSelector(string sCategoryFilter, GameObject msgDst, string sMsgMajor)
Parameters
  • sCtageroyFilter = The category filter string for the MapObjects to be displayed
  • msgDst = Receiver of a message containing the selection data
  • sMsgMajor = A message major string
Returned Value
  • None
Notes
  • Initialises this Menu object to automatically add map objects matching a specific category filter. This menu will dynamically generate sorted sub-menus as required
  • Upon selection of a menu item by the player, a message will be posted to msgDst, using the sMsgMajor string provided and with the message parameter soup containing the following data:

object-id (GameObjectID) - The ID of the object selected
object-name (string) - The localised name of the object selected

Personal tools