Difference between revisions of "TileDisplay"
Jump to navigation
Jump to search
(Initial creation) |
m (added category tag) |
||
Line 38: | Line 38: | ||
| [[TileDisplay.setCellTint]] ''x'', ''y'', ''c'' || set the tint of cell ''x'', ''y'' to color ''c'' | | [[TileDisplay.setCellTint]] ''x'', ''y'', ''c'' || set the tint of cell ''x'', ''y'' to color ''c'' | ||
|} | |} | ||
+ | |||
+ | [[Category:Mini Micro]] |
Revision as of 00:13, 4 December 2020
The TileDisplay
class in Mini Micro is a display type that holds and draws a grid of tiles, small images taken from a larger image called a tile set.
No display is configured as a tile display by default. But you can make any display layer a tile display by setting its mode to displayMode.tile
.
Methods and Properties
Method or Property | Purpose |
---|---|
TileDisplay.extent [columns, rows] | display size |
TileDisplay.tileSet | Image containing tiles to draw from |
TileDisplay.tileSetTileSize | size of tiles in `tileSet` |
TileDisplay.cellSize | size of tiles on screen |
TileDisplay.overlap | cell overlap, in pixels |
TileDisplay.oddRowOffset | amount to shift odd rows horizontally; use 0.5 for hex rows |
TileDisplay.oddColOffset | amount to shift odd columns vertically; use 0.5 for hex columns |
TileDisplay.scrollX | horizontal scroll amount, in pixels |
TileDisplay.scrollY | vertical scroll amount, in pixels |
TileDisplay.clear toIndex | set all tiles to null (the default) or the given index |
TileDisplay.cell(x, y) | get the tile index of cell x, y |
TileDisplay.setCell x, y, idx | set the tile index of cell x, y to idx |
TileDisplay.cellTint(x, y) | get the tint color of cell x, y |
TileDisplay.setCellTint x, y, c | set the tint of cell x, y to color c |