From 8ec7b8522a5987ef953b37a2e7eaf754f802059a Mon Sep 17 00:00:00 2001 From: Milan Nikolic Date: Thu, 11 Nov 2021 17:46:15 +0100 Subject: [PATCH] Add new functions --- raylib/rcore.go | 22 ++++++++++++++++++++++ raylib/rgestures.go | 7 ------- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/raylib/rcore.go b/raylib/rcore.go index be63c6c..3ca5fcd 100644 --- a/raylib/rcore.go +++ b/raylib/rcore.go @@ -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 +} diff --git a/raylib/rgestures.go b/raylib/rgestures.go index 2382e2c..48e0265 100644 --- a/raylib/rgestures.go +++ b/raylib/rgestures.go @@ -27,13 +27,6 @@ func GetGestureDetected() Gestures { return v } -// GetTouchPointCount - Get number of touch points -func GetTouchPointCount() int32 { - ret := C.GetTouchPointCount() - v := (int32)(ret) - return v -} - // GetGestureHoldDuration - Get gesture hold time in milliseconds func GetGestureHoldDuration() float32 { ret := C.GetGestureHoldDuration()