The civ.ui library: Difference between revisions
mNo edit summary |
(Changed the names of the linked to pages, so that they are the full command (for clarity and to prevent conflicts)) |
||
Line 4: | Line 4: | ||
---- | ---- | ||
[[civ.ui.centerView|centerView]] | |||
[[centerView]] | |||
civ.ui.centerView(tile) | civ.ui.centerView(tile) | ||
Line 14: | Line 11: | ||
[[redrawMap]] | [[civ.ui.redrawMap|redrawMap]] | ||
civ.ui.redrawMap() | civ.ui.redrawMap() | ||
Line 21: | Line 18: | ||
[[redrawTile]] | [[civ.ui.redrawTile|redrawTile]] | ||
civ.ui.redrawTile(tile) | civ.ui.redrawTile(tile) | ||
Line 28: | Line 25: | ||
[[setZoom]] | [[civ.ui.setZoom|setZoom]] | ||
civ.ui.setZoom(integer) | civ.ui.setZoom(integer) | ||
Line 35: | Line 32: | ||
[[text]] | [[civ.ui.text|text]] | ||
civ.ui.text(string) | civ.ui.text(string) | ||
Line 42: | Line 39: | ||
[[zoomIn]] | [[civ.ui.zoomIn|zoomIn]] | ||
civ.ui.zoomIn() | civ.ui.zoomIn() | ||
Line 48: | Line 45: | ||
Zooms in on the map (increases zoom level by 1). | Zooms in on the map (increases zoom level by 1). | ||
[[civ.ui.zoomOut|zoomOut]] | |||
[[zoomOut]] | |||
civ.ui.zoomOut() | civ.ui.zoomOut() | ||
Line 55: | Line 51: | ||
Zooms out of the map (decreases zoom level by 1). | Zooms out of the map (decreases zoom level by 1). | ||
[[civ.ui.loadTerrain|loadTerrain]] | |||
[[loadTerrain]] | |||
civ.ui.loadTerrain(map, filename1, filename2) | civ.ui.loadTerrain(map, filename1, filename2) | ||
Line 62: | Line 57: | ||
Replaces terrain graphics for map number `map`, loading graphics from `filename1` (corresponding to "TERRAIN1.BMP") and `filename2` (corresponding to "TERRAIN2.BMP") | Replaces terrain graphics for map number `map`, loading graphics from `filename1` (corresponding to "TERRAIN1.BMP") and `filename2` (corresponding to "TERRAIN2.BMP") | ||
[[civ.ui.createDialog|createDialog]] | |||
[[createDialog]] | |||
civ.ui.createDialog() -> dialog | civ.ui.createDialog() -> dialog | ||
Creates and initializes a dialog. See the [[dialog]] section for more details. | Creates and initializes a dialog. See the [[The dialog object|dialog]] section for more details. |
Revision as of 21:49, 1 January 2019
Back To TOTPP Functions
civ.ui.centerView(tile)
Centers the map on the given tile.
civ.ui.redrawMap()
Redraws the entire map.
civ.ui.redrawTile(tile)
Redraws the given tile.
civ.ui.setZoom(integer)
Sets the zoom level (range from -7 (max zoom out) to 8 (max zoom in)).
civ.ui.text(string)
Display a pop-up text box with the given string as text.
civ.ui.zoomIn()
Zooms in on the map (increases zoom level by 1).
civ.ui.zoomOut()
Zooms out of the map (decreases zoom level by 1).
civ.ui.loadTerrain(map, filename1, filename2)
Replaces terrain graphics for map number `map`, loading graphics from `filename1` (corresponding to "TERRAIN1.BMP") and `filename2` (corresponding to "TERRAIN2.BMP")
civ.ui.createDialog() -> dialog
Creates and initializes a dialog. See the dialog section for more details.