Zappy GUI
C++ graphic client: renderer, camera, network
Loading...
Searching...
No Matches
GridRenderer.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "raylib.h"
4
9 public:
10 static constexpr Color TILE_COLOR = {230, 230, 230, 255};
11 static constexpr Color TILE_COLOR_ALT = {210, 210, 210, 255};
12
19 static void drawTiles(int width, int height, float tileSize);
20
28 static void drawGrid(int width, int height, float tileSize, Color color = GRAY);
29
40 static void drawTileHighlight(int tileX, int tileY, int worldWidth, int worldHeight,
41 float tileSize, Color color, float lineThickness = 1.0f);
42};
Helper class for rendering the game world grid.
static constexpr Color TILE_COLOR
static void drawGrid(int width, int height, float tileSize, Color color=GRAY)
Draws a custom grid centered at (0, 0, 0).
static void drawTiles(int width, int height, float tileSize)
Draws filled tile quads for the entire grid in a checkerboard pattern.
static constexpr Color TILE_COLOR_ALT
static void drawTileHighlight(int tileX, int tileY, int worldWidth, int worldHeight, float tileSize, Color color, float lineThickness=1.0f)
Draws a highlight outline around a specific tile.