The civ.ui library: Difference between revisions

From Scenario League Wiki
Jump to navigationJump to search
(Changed the names of the linked to pages, so that they are the full command (for clarity and to prevent conflicts))
mNo edit summary
Line 46: Line 46:


[[civ.ui.zoomOut|zoomOut]]
[[civ.ui.zoomOut|zoomOut]]


civ.ui.zoomOut()
civ.ui.zoomOut()


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]]
Line 56: Line 58:


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]]

Revision as of 21:50, 1 January 2019


Back To TOTPP Functions


centerView

civ.ui.centerView(tile)

Centers the map on the given tile.


redrawMap

civ.ui.redrawMap()

Redraws the entire map.


redrawTile

civ.ui.redrawTile(tile)

Redraws the given tile.


setZoom

civ.ui.setZoom(integer)

Sets the zoom level (range from -7 (max zoom out) to 8 (max zoom in)).


text

civ.ui.text(string)

Display a pop-up text box with the given string as text.


zoomIn

civ.ui.zoomIn()

Zooms in on the map (increases zoom level by 1).

zoomOut


civ.ui.zoomOut()

Zooms out of the map (decreases zoom level by 1).


loadTerrain

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")


createDialog

civ.ui.createDialog() -> dialog

Creates and initializes a dialog. See the dialog section for more details.