Difference between revisions of "TileDisplay.scrollY"

From MiniScript Wiki
Jump to navigation Jump to search
(added usage note)
 
(→‎Example: fixed comment to match actual code)
 
Line 16: Line 16:
 
td.clear 16  // sets all cells to index 16
 
td.clear 16  // sets all cells to index 16
 
for i in range(0,300,10)
 
for i in range(0,300,10)
td.scrollY = i  // scroll more to the left on each update
+
td.scrollY = i  // scroll down more on each update
 
wait 0.2
 
wait 0.2
 
end for</ms>
 
end for</ms>
  
 
[[Category:Mini Micro]]
 
[[Category:Mini Micro]]

Latest revision as of 13:20, 15 October 2021

TileDisplay.scrollY: Vertical scroll amount by which the whole tile display is scrolled down.

See also: TileDisplay.scrollX; PixelDisplay.scrollY; SpriteDisplay.scrollY

Usage Notes

Calling TileDisplay.clear does not reset TileDisplay.scrollX and TileDisplay.scrollY. So, when you want to fully reset a tile display, remember to set these properties back to 0.

Example

clear
display(4).mode = displayMode.tile
td = display(4)
td.tileSet = file.loadImage("/sys/pics/TileShapes.png")
td.tileSetTileSize = 64
td.clear 16  // sets all cells to index 16
for i in range(0,300,10)
	td.scrollY = i  // scroll down more on each update
	wait 0.2
end for