Update RingRayLib - raylib.c - Add Function : void OpenURL(const char *url)
@@ -1026,6 +1026,20 @@ RING_FUNC(ring_StorageLoadValue)
RING_API_RETNUMBER(StorageLoadValue( (int ) RING_API_GETNUMBER(1)));
}
+
+RING_FUNC(ring_OpenURL)
+{
+ if ( RING_API_PARACOUNT != 1 ) {
+ RING_API_ERROR(RING_API_MISS1PARA);
+ return ;
+ }
+ if ( ! RING_API_ISSTRING(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ OpenURL(RING_API_GETSTRING(1));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -1105,4 +1119,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("getfilemodtime",ring_GetFileModTime);
ring_vm_funcregister("storagesavevalue",ring_StorageSaveValue);
ring_vm_funcregister("storageloadvalue",ring_StorageLoadValue);
+ ring_vm_funcregister("openurl",ring_OpenURL);
}
