The civ.ui library: Difference between revisions
(Changed the names of the linked to pages, so that they are the full command (for clarity and to prevent conflicts)) |
m (Added to category lua resources) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:Resources]] | [[Category:Lua Resources]] | ||
Back To [[TOTPP Functions]] | Back To [[TOTPP Functions]] | ||
Line 6: | Line 5: | ||
[[civ.ui.centerView|centerView]] | [[civ.ui.centerView|centerView]] | ||
civ.ui.centerView(tile) | <code>civ.ui.centerView(tile)</code> | ||
Centers the map on the given tile. | Centers the map on the given tile. | ||
Line 13: | Line 12: | ||
[[civ.ui.redrawMap|redrawMap]] | [[civ.ui.redrawMap|redrawMap]] | ||
civ.ui.redrawMap() | <code>civ.ui.redrawMap()</code> | ||
Redraws the entire map. | Redraws the entire map. | ||
Line 20: | Line 19: | ||
[[civ.ui.redrawTile|redrawTile]] | [[civ.ui.redrawTile|redrawTile]] | ||
civ.ui.redrawTile(tile) | <code>civ.ui.redrawTile(tile)</code> | ||
Redraws the given tile. | Redraws the given tile. | ||
Line 27: | Line 26: | ||
[[civ.ui.setZoom|setZoom]] | [[civ.ui.setZoom|setZoom]] | ||
civ.ui.setZoom(integer) | <code>civ.ui.setZoom(integer)</code> | ||
Sets the zoom level (range from -7 (max zoom out) to 8 (max zoom in)). | Sets the zoom level (range from -7 (max zoom out) to 8 (max zoom in)). | ||
Line 34: | Line 33: | ||
[[civ.ui.text|text]] | [[civ.ui.text|text]] | ||
civ.ui.text(string) | <code>civ.ui.text(string)</code> | ||
Display a pop-up text box with the given string as text. | Display a pop-up text box with the given string as text. | ||
Line 41: | Line 40: | ||
[[civ.ui.zoomIn|zoomIn]] | [[civ.ui.zoomIn|zoomIn]] | ||
civ.ui.zoomIn() | <code>civ.ui.zoomIn()</code> | ||
Zooms in on the map (increases zoom level by 1). | Zooms in on the map (increases zoom level by 1). | ||
[[civ.ui.zoomOut|zoomOut]] | [[civ.ui.zoomOut|zoomOut]] | ||
civ.ui.zoomOut() | <code>civ.ui.zoomOut()</code> | ||
Zooms out of the map (decreases zoom level by 1). | Zooms out of the map (decreases zoom level by 1). | ||
[[civ.ui.loadTerrain|loadTerrain]] | [[civ.ui.loadTerrain|loadTerrain]] | ||
civ.ui.loadTerrain(map, filename1, filename2) | <code>civ.ui.loadTerrain(map, filename1, filename2)</code> | ||
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]] | [[civ.ui.createDialog|createDialog]] | ||
civ.ui.createDialog() -> dialog | <code>civ.ui.createDialog() -> dialog</code> | ||
Creates and initializes a dialog. See the [[The dialog object|dialog]] section for more details. | Creates and initializes a dialog. See the [[The dialog object|dialog]] section for more details. |
Latest revision as of 20:09, 26 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.