Update RingRayLib - raylib.c - Add Function : void SetMousePosition(int x, int y)
@@ -1371,6 +1371,24 @@ RING_FUNC(ring_GetMousePosition)
}
}
+
+RING_FUNC(ring_SetMousePosition)
+{
+ 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 ;
+ }
+ SetMousePosition( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -1474,4 +1492,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("getmousex",ring_GetMouseX);
ring_vm_funcregister("getmousey",ring_GetMouseY);
ring_vm_funcregister("getmouseposition",ring_GetMousePosition);
+ ring_vm_funcregister("setmouseposition",ring_SetMousePosition);
}
