mirror of
https://github.com/raysan5/raygui.git
synced 2025-12-25 10:22:33 -05:00
Update raygui.h
This commit is contained in:
@ -3272,8 +3272,9 @@ Vector2 GuiGrid(Rectangle bounds, float spacing, int subdivs)
|
||||
{
|
||||
if (CheckCollisionPointRec(mousePoint, bounds))
|
||||
{
|
||||
currentCell.x = (mousePoint.x - bounds.x)/spacing;
|
||||
currentCell.y = (mousePoint.y - bounds.y)/spacing;
|
||||
// NOTE: Cell values must be rounded to int
|
||||
currentCell.x = (int)((mousePoint.x - bounds.x)/spacing);
|
||||
currentCell.y = (int)((mousePoint.y - bounds.y)/spacing);
|
||||
}
|
||||
}
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user