add Canvas::DrawInfoGrid for custom labeled grids

This commit is contained in:
scawful
2024-07-28 11:31:13 -04:00
parent dd3596607d
commit 90ed9e1b86
2 changed files with 39 additions and 3 deletions

View File

@@ -65,7 +65,7 @@ class Canvas : public SharedRom {
float scale = 1.0f);
void UpdateInfoGrid(ImVec2 bg_size, int tile_size, float scale = 1.0f,
float grid_size = 64.0f);
float grid_size = 64.0f, int label_id = 0);
// Background for the Canvas represents region without any content drawn to
// it, but can be controlled by the user.
@@ -115,6 +115,9 @@ class Canvas : public SharedRom {
void DrawGrid(float grid_step = 64.0f, int tile_id_offset = 8);
void DrawOverlay(); // last
void DrawInfoGrid(float grid_step = 64.0f, int tile_id_offset = 8,
int label_id = 0);
void DrawLayeredElements();
int GetTileIdFromMousePos() {