Update RingRayLib - raylib.c - Add Function : void DrawText(const char *text, int posX, int posY, int fontSize, Color color)
@@ -4088,6 +4088,34 @@ RING_FUNC(ring_DrawFPS)
DrawFPS( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2));
}
+
+RING_FUNC(ring_DrawText)
+{
+ if ( RING_API_PARACOUNT != 5 ) {
+ RING_API_ERROR(RING_API_BADPARACOUNT);
+ return ;
+ }
+ if ( ! RING_API_ISSTRING(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(2) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(3) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(4) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ DrawText(RING_API_GETSTRING(1), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3), (int ) RING_API_GETNUMBER(4),* (Color *) RING_API_GETCPOINTER(5,"Color"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(5))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(5,"Color"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -4327,4 +4355,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("genimagefontatlas",ring_GenImageFontAtlas);
ring_vm_funcregister("unloadfont",ring_UnloadFont);
ring_vm_funcregister("drawfps",ring_DrawFPS);
+ ring_vm_funcregister("drawtext",ring_DrawText);
}
