diff options
| author | jussi | 2022-02-21 19:05:05 +0200 |
|---|---|---|
| committer | jussi | 2022-02-21 19:05:05 +0200 |
| commit | 612ede6da40550fc0b14c1370f616fc6e83df550 (patch) | |
| tree | 788e0d00820ee85209506c78ec76d397a617cd03 /src/text.c | |
| parent | 8182a5f1b6c61bdf95d32a4ad102e1762f0d0924 (diff) | |
| download | reilua-enhanced-612ede6da40550fc0b14c1370f616fc6e83df550.tar.gz reilua-enhanced-612ede6da40550fc0b14c1370f616fc6e83df550.tar.bz2 reilua-enhanced-612ede6da40550fc0b14c1370f616fc6e83df550.zip | |
Documentation. waving_cubes example and RL_DrawFPS and RL_ColorFromHSV.
Diffstat (limited to 'src/text.c')
| -rw-r--r-- | src/text.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -66,6 +66,28 @@ int lmodelsLoadFont( lua_State *L ) { */ /* +> 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 ) Draw text using font and additional parameters |
