81 float SnapX(
float x)
const;
86 float SnapY(
float y)
const;
91 void Snap(
float& x,
float& y)
const;
Singleton grid-snapping helper.
void Toggle()
Toggles snapping on/off.
static GridSnapping & Get()
Returns the single shared instance.
float SnapX(float x) const
Snaps a single x coordinate to the nearest grid line.
float SnapY(float y) const
Snaps a single y coordinate to the nearest grid line.
void SetEnabled(bool enabled)
void SetGridSize(int size)
Sets the grid cell size.
void Snap(float &x, float &y) const
Snaps both x and y coordinates in place.
int GetGridSize() const
Returns the current grid cell size in pixels (default: 16).
< Provides AssetID and INVALID_ASSET_ID