Update RingRayLib - raylib.c - Add Function : void SetMouseOffset(int offsetX, int offsetY)
@@ -1389,6 +1389,24 @@ RING_FUNC(ring_SetMousePosition)
SetMousePosition( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2));
}
+
+RING_FUNC(ring_SetMouseOffset)
+{
+ if ( RING_API_PARACOUNT != 2 ) {
+ RING_API_ERROR(RING_API_MISS2PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(2) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ SetMouseOffset( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -1493,4 +1511,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("getmousey",ring_GetMouseY);
ring_vm_funcregister("getmouseposition",ring_GetMousePosition);
ring_vm_funcregister("setmouseposition",ring_SetMousePosition);
+ ring_vm_funcregister("setmouseoffset",ring_SetMouseOffset);
}
