The civ.ui library: Difference between revisions
(New page for civ.ui library) |
m (Added to category lua resources) |
||
(5 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]] | ||
---- | ---- | ||
[[civ.ui.centerView|centerView]] | |||
<code>civ.ui.centerView(tile)</code> | |||
civ.ui.centerView(tile) | |||
Centers the map on the given tile. | Centers the map on the given tile. | ||
[[redrawMap]] | [[civ.ui.redrawMap|redrawMap]] | ||
civ.ui.redrawMap() | <code>civ.ui.redrawMap()</code> | ||
Redraws the entire map. | Redraws the entire map. | ||
[[redrawTile]] | [[civ.ui.redrawTile|redrawTile]] | ||
civ.ui.redrawTile(tile) | <code>civ.ui.redrawTile(tile)</code> | ||
Redraws the given tile. | Redraws the given tile. | ||
[[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)). | ||
[[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. | ||
[[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). | ||
[[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). | ||
[[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") | ||
[[createDialog]] | [[civ.ui.createDialog|createDialog]] | ||
civ.ui.createDialog() -> dialog | <code>civ.ui.createDialog() -> dialog</code> | ||
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. |
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.