GetMapTitle()
Summary
Gets the title of a map.
Syntax
GetMapTitle(string map_name)
| Argument | Contents |
|---|---|
| map_name | The name of the map or null for the current map |
Returns
The map title, which is the string on the window title bar, to the right of the map filename.
Notes
-
Two maps can have the same map title, but they cannot have the same map name. Map names are set by CreateMap() and OpenMap() and are gotten with GetMap(), GetMaps(), and GetMapNames().
-
To change the filename portion of the window title you must change the map filename, which can be done with SetMapFile().
Example
// Get the name of the current map
map_name = GetMap()
// Get the title of the current map
map_title = GetMapTitle(map_name)
//Show both
ShowMessage("Map " + map_name + " has the title " + map_title)
Error Codes
| Error Type | Meaning |
|---|---|
| NotFound | The specified map does not exist |
See Also
| Function | Summary |
|---|---|
| CreateMap() | Create a new, empty map window |
| OpenMap() | Open a map file and display it in a map window |
| GetMap() | Gets the name of the current map |
| GetMaps() | Get a list of maps and the name of the current map |
| GetMapNames() | Gets a list of the names of maps in the system |
| SetMapTitle() | Sets the title of a map |
| GetMapFile() | Gets the name of the file in which a map was last saved |
| SetMapFile() | Sets the filename for a map |