Difference between revisions of "TileDisplay.scrollX"

From MiniScript Wiki
Jump to navigation Jump to search
(Initial creation)
 
(added example)
Line 5: Line 5:
 
== Example ==
 
== Example ==
  
<ms></ms>
+
<ms>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,500,10)
 +
td.scrollX = i  // scroll more to the left on each update
 +
wait 0.2
 +
end for</ms>
  
 
[[Category:Mini Micro]]
 
[[Category:Mini Micro]]

Revision as of 00:13, 4 December 2020

TileDisplay.scrollX: Horizontal scroll amount by which the whole tile display is scrolled to the left.

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

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,500,10)
	td.scrollX = i  // scroll more to the left on each update
	wait 0.2
end for