Enumerations | |
| enum class | GridType { Object , Sprite , Item , Door } |
| Snapping grids for different dungeon elements. More... | |
Functions | |
| int | SnapToTile (int pixel) |
| Snap a pixel coordinate to the 8px tile grid. | |
| int | SnapToGrid (int pixel, int grid_size) |
| Snap a pixel coordinate to a specific grid size. | |
| ImVec2 | SnapToTileGrid (const ImVec2 &point) |
| Snap a point to the 8px tile grid. | |
| ImVec2 | SnapToItemGrid (const ImVec2 &point) |
| Snap a point for Pot Items (X: 4px, Y: 16px) | |
| ImVec2 | SnapToSpriteGrid (const ImVec2 &point) |
| Snap a point for Sprites (16x16px) | |
|
strong |
Snapping grids for different dungeon elements.
| Enumerator | |
|---|---|
| Object | |
| Sprite | |
| Item | |
| Door | |
Definition at line 13 of file dungeon_snapping.h.
|
inline |
Snap a pixel coordinate to the 8px tile grid.
Definition at line 23 of file dungeon_snapping.h.
Referenced by SnapToTileGrid().
|
inline |
Snap a pixel coordinate to a specific grid size.
Definition at line 30 of file dungeon_snapping.h.
Referenced by SnapToItemGrid(), and SnapToSpriteGrid().
|
inline |
Snap a point to the 8px tile grid.
Definition at line 38 of file dungeon_snapping.h.
References SnapToTile().
Referenced by yaze::editor::TileObjectHandler::HandleDrag(), and yaze::editor::TileObjectHandler::InitDrag().

|
inline |
Snap a point for Pot Items (X: 4px, Y: 16px)
Definition at line 46 of file dungeon_snapping.h.
References SnapToGrid().

|
inline |
Snap a point for Sprites (16x16px)
Definition at line 54 of file dungeon_snapping.h.
References SnapToGrid().
