Fix mouseCell pointer not updaing value

This commit is contained in:
Michał 2023-12-19 14:38:36 +00:00 committed by GitHub
parent 48309e2407
commit cf285a20a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -621,6 +621,8 @@ func Grid(bounds rl.Rectangle, text string, spacing float32, subdivs int32, mous
cmouseCell.x = C.float(mouseCell.X) cmouseCell.x = C.float(mouseCell.X)
cmouseCell.y = C.float(mouseCell.Y) cmouseCell.y = C.float(mouseCell.Y)
res := C.GuiGrid(cbounds, ctext, cspacing, csubdivs, &cmouseCell) res := C.GuiGrid(cbounds, ctext, cspacing, csubdivs, &cmouseCell)
mouseCell.X = float32(cmouseCell.x)
mouseCell.Y = float32(cmouseCell.y)
return int32(res) return int32(res)
} }