Add new functions

This commit is contained in:
Milan Nikolic 2021-11-11 17:46:15 +01:00
parent bef397e0ae
commit 8ec7b8522a
No known key found for this signature in database
GPG key ID: 9229D0EAA3AA4E75
2 changed files with 22 additions and 7 deletions

View file

@ -798,6 +798,13 @@ func GetMousePosition() Vector2 {
return v
}
// GetMouseDelta - Get mouse delta between frames
func GetMouseDelta() Vector2 {
ret := C.GetMouseDelta()
v := newVector2FromPointer(unsafe.Pointer(&ret))
return v
}
// SetMousePosition - Set mouse position XY
func SetMousePosition(x, y int) {
cx := (C.int)(x)
@ -847,3 +854,18 @@ func GetTouchPosition(index int32) Vector2 {
v := newVector2FromPointer(unsafe.Pointer(&ret))
return v
}
// GetTouchPointId - Get touch point identifier for given index
func GetTouchPointId(index int32) int32 {
cindex := (C.int)(index)
ret := C.GetTouchPointId(cindex)
v := (int32)(ret)
return v
}
// GetTouchPointCount - Get number of touch points
func GetTouchPointCount() int32 {
ret := C.GetTouchPointCount()
v := (int32)(ret)
return v
}