![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Shared utility for rendering grid backgrounds on any canvas editor. More...
#include <CanvasGridRenderer.h>
Classes | |
| struct | GridConfig |
| Configuration parameters for grid rendering. More... | |
Public Types | |
| enum | GridStylePreset { Style_VisualScript , Style_Compact , Style_Spacious } |
| Pre-configured grid styles matching professional editors. More... | |
Static Public Member Functions | |
| static GridConfig | GetStylePreset (GridStylePreset preset) |
| Get pre-configured grid style (VisualScript/Compact/Spacious) | |
| static void | RenderGrid (ImDrawList *drawList, const GridConfig &config) |
| Render a grid on the given ImDrawList. | |
| static void | RenderGrid (const GridConfig &config) |
| Convenience overload using ImGui's current context. | |
Shared utility for rendering grid backgrounds on any canvas editor.
Provides configurable grid rendering with support for:
Definition at line 18 of file CanvasGridRenderer.h.
Pre-configured grid styles matching professional editors.
| Enumerator | |
|---|---|
| Style_VisualScript | |
| Style_Compact | |
| Style_Spacious | |
Definition at line 25 of file CanvasGridRenderer.h.
|
static |
Get pre-configured grid style (VisualScript/Compact/Spacious)
| preset | The style preset to use |
Definition at line 6 of file CanvasGridRenderer.cpp.
References GetComponentTypeID_Static(), Olympe::CanvasGridRenderer::GridConfig::majorSpacing, Style_Compact, Style_Spacious, and Style_VisualScript.
Referenced by Olympe::CustomCanvasEditor::GetGridConfig(), Olympe::ImNodesCanvasEditor::GetGridConfig(), Olympe::PrefabCanvas::RenderGrid(), Olympe::CustomCanvasEditor::RenderGrid(), and Olympe::ImNodesCanvasEditor::RenderGrid().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Convenience overload using ImGui's current context.
| config | Grid configuration parameters |
Definition at line 144 of file CanvasGridRenderer.cpp.
References GetComponentTypeID_Static(), and RenderGrid().
Here is the call graph for this function:
|
static |
Render a grid on the given ImDrawList.
| drawList | ImGui draw list to render to |
| config | Grid configuration parameters |
Definition at line 50 of file CanvasGridRenderer.cpp.
References GetComponentTypeID_Static().
Referenced by Olympe::PrefabCanvas::RenderGrid(), Olympe::CustomCanvasEditor::RenderGrid(), Olympe::ImNodesCanvasEditor::RenderGrid(), and RenderGrid().
Here is the call graph for this function:
Here is the caller graph for this function: