Update RingRayLib - raylib.c - Add Function : void SetExitKey(int key)
@@ -1106,6 +1106,20 @@ RING_FUNC(ring_GetKeyPressed)
RING_API_RETNUMBER(GetKeyPressed());
}
+
+RING_FUNC(ring_SetExitKey)
+{
+ if ( RING_API_PARACOUNT != 1 ) {
+ RING_API_ERROR(RING_API_MISS1PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ SetExitKey( (int ) RING_API_GETNUMBER(1));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -1191,4 +1205,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("iskeyreleased",ring_IsKeyReleased);
ring_vm_funcregister("iskeyup",ring_IsKeyUp);
ring_vm_funcregister("getkeypressed",ring_GetKeyPressed);
+ ring_vm_funcregister("setexitkey",ring_SetExitKey);
}
