From 612ede6da40550fc0b14c1370f616fc6e83df550 Mon Sep 17 00:00:00 2001 From: jussi Date: Mon, 21 Feb 2022 19:05:05 +0200 Subject: Documentation. waving_cubes example and RL_DrawFPS and RL_ColorFromHSV. --- src/text.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/text.c') diff --git a/src/text.c b/src/text.c index 0637971..bd6dea5 100644 --- a/src/text.c +++ b/src/text.c @@ -65,6 +65,28 @@ int lmodelsLoadFont( lua_State *L ) { ## Text - Draw */ +/* +> success = RL_DrawFPS( Vector2 pos ) + +Draw current FPS + +- Failure return false +- Success return true +*/ +int ltextDrawFPS( lua_State *L ) { + if ( !lua_istable( L, -1 ) ) { + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawFPS( Vector2 pos )" ); + lua_pushboolean( L, false ); + return 1; + } + Vector2 pos = uluaGetVector2( L ); + + DrawFPS( pos.x, pos.y ); + lua_pushboolean( L, true ); + + return 1; +} + /* > success = RL_DrawText( Font font, string text, Vector2 position, float fontSize, float spacing, Color tint ) -- cgit v1.2.3