Update RingRayLib - raylib.c - Add Function : void DrawTextRec(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint)
@@ -4144,6 +4144,38 @@ RING_FUNC(ring_DrawTextEx)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(6,"Color"));
}
+
+RING_FUNC(ring_DrawTextRec)
+{
+ if ( RING_API_PARACOUNT != 7 ) {
+ RING_API_ERROR(RING_API_BADPARACOUNT);
+ return ;
+ }
+ if ( ! RING_API_ISSTRING(2) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(4) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(5) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(6) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ DrawTextRec(* (Font *) RING_API_GETCPOINTER(1,"Font"),RING_API_GETSTRING(2),* (Rectangle *) RING_API_GETCPOINTER(3,"Rectangle"), (float ) RING_API_GETNUMBER(4), (float ) RING_API_GETNUMBER(5), (bool ) RING_API_GETNUMBER(6),* (Color *) RING_API_GETCPOINTER(7,"Color"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(1))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Font"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(3))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(3,"Rectangle"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(7))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(7,"Color"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -4385,4 +4417,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("drawfps",ring_DrawFPS);
ring_vm_funcregister("drawtext",ring_DrawText);
ring_vm_funcregister("drawtextex",ring_DrawTextEx);
+ ring_vm_funcregister("drawtextrec",ring_DrawTextRec);
}
