Drawing on Tiles

Published

Each Screen contains a TileGrid object that represents the visual state of the Screen. Each TileGrid can be thought of as a 2D array of Tile, or GraphicTile, objects.

For this guide, we will only work with Tile objects.

Retrieving a Tile

Before you can draw on a tile, you must first retrieve it from the TileGrid of your Screen using the getTileAt(x, y) function of the Screen class.

setCharacter(int)

This function changes the character displayed on a Tile.

setBackgroundColor(Color)

This function changes the background color, the color behind the character, displayed on a Tile.

setForegroundColor(Color)

This function changes the foreground color, the color of the character, displayed on a Tile.

setUnderlined(boolean)

If enabled, set to true, this adds a line to the bottom of the Tile. When drawn with a character, in this case the X character, the character appears to be underlined.

setUnderlineThickness(int)

This function changes the thickness of the line added to the bottom of a Tile when setUnderlined(boolean) is set to true.

setFlippedHorizontally(boolean)

This function flips the displayed charcter, on the horizontal axis.

setFlippedVertically(boolean)

This function flips the displayed charcter, on the vertical axis.

addShaders(Shader...)

This function adds one, or more, shaders to a Tile.

removeShaders(Shader...)

This function removes one, or more, shaders from a Tile.

removeAllShaders()

This function removes all shaders from a Tile.


Return to Documentation