Update RingRayLib - raylib.c - Add Function : void SetWindowIcon(Image image)
@@ -117,6 +117,18 @@ RING_FUNC(ring_HideWindow)
HideWindow();
}
+
+RING_FUNC(ring_SetWindowIcon)
+{
+ if ( RING_API_PARACOUNT != 1 ) {
+ RING_API_ERROR(RING_API_MISS1PARA);
+ return ;
+ }
+ SetWindowIcon(* (Image *) RING_API_GETCPOINTER(1,"Image"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(1))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Image"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -129,4 +141,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("togglefullscreen",ring_ToggleFullscreen);
ring_vm_funcregister("unhidewindow",ring_UnhideWindow);
ring_vm_funcregister("hidewindow",ring_HideWindow);
+ ring_vm_funcregister("setwindowicon",ring_SetWindowIcon);
}
