From MiniScript Wiki
Jump to navigation Jump to search

In Mini Micro, the extent property of a TileDisplay is used to set the number of columns and rows in the display. It can be either a simple number, used for both columns and rows; or a two-element list containing the desired number of columns and rows.


The following code prepares a tile display with 15 columns and 10 rows:

display(5).mode = displayMode.tile
td = display(5)
td.tileSet = file.loadImage("/sys/pics/TileShapes.png")
td.tileSetTileSize = 64  // size of each tile in the image
td.extent = [15, 10]  // columns, rows on screen

(See TileDisplay for the full version of this example.)