Defines the render properties of a Grid2D.
More...
#include <Grid2DRenderer.h>
Defines the render properties of a Grid2D.
This class determines how a grid looks
Definition at line 41 of file Grid2DRenderer.h.
◆ Callback
◆ Grid2DRenderer()
ime::Grid2DRenderer::Grid2DRenderer |
( |
| ) |
|
◆ getCollidableTileColour()
Colour ime::Grid2DRenderer::getCollidableTileColour |
( |
| ) |
const |
Get the colour of a grid tile when it is collidable.
- Returns
- The colour of a collidable tile
- See also
- setCollidableTileColour
◆ getGridLineColour()
Colour ime::Grid2DRenderer::getGridLineColour |
( |
| ) |
const |
Get the colour of the grid lines.
- Returns
- The colour of the grid lines
- See also
- setGridLineColour
◆ getTileColour()
Colour ime::Grid2DRenderer::getTileColour |
( |
| ) |
const |
Get the colour of the grid tile.
- Returns
- The colour of the grid tile
- See also
- setTileColour
◆ isVisible()
bool ime::Grid2DRenderer::isVisible |
( |
| ) |
const |
Check if the grid is visible or not.
- Returns
- True if the grid is visible, otherwise false
- See also
- setVisible
◆ setBackgroundTexture()
void ime::Grid2DRenderer::setBackgroundTexture |
( |
const std::string & |
filename | ) |
|
Set the background texture of the grid.
- Parameters
-
filename | The file name of the texture to be set |
- Exceptions
-
◆ setCollidableTileColour()
void ime::Grid2DRenderer::setCollidableTileColour |
( |
const Colour & |
colour | ) |
|
Set the colour of a tile when it is collidable.
- Parameters
-
When the tile is no longer collidable, it will be set to the normal tile colour
- See also
- getCollidableTileColour
◆ setGridLineColour()
void ime::Grid2DRenderer::setGridLineColour |
( |
const Colour & |
colour | ) |
|
Set the colour of the grid lines.
- Parameters
-
colour | The colour of the grid lines |
- See also
- getGridLineColour
◆ setTileColour()
void ime::Grid2DRenderer::setTileColour |
( |
const Colour & |
colour | ) |
|
Set the colour of the grid tiles.
- Parameters
-
colour | The new colour of the grid tiles |
- See also
- getTileColour
◆ setVisible()
void ime::Grid2DRenderer::setVisible |
( |
bool |
visible | ) |
|
Show or hide the grid.
- Parameters
-
visible | True to show it or false to hide it |
By default, the grid is visible
- See also
- isVisible
◆ toggleVisibility()
void ime::Grid2DRenderer::toggleVisibility |
( |
| ) |
|
Toggle the visibility of the grid.
This function will show the grid if it is currently visible or hide it if its currently visible
- See also
- setVisible, isVisible
The documentation for this class was generated from the following file: