From dc2edd69440fcc2470a45562149166695d4edbcc Mon Sep 17 00:00:00 2001 From: jussi Date: Fri, 14 Apr 2023 00:11:58 +0300 Subject: Raygui wrapper lib. --- src/rgui.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/rgui.c') diff --git a/src/rgui.c b/src/rgui.c index 57f4a4d..e2c1fa0 100644 --- a/src/rgui.c +++ b/src/rgui.c @@ -131,7 +131,7 @@ int lguiGuiGetState( lua_State *L ) { /* > success = RL.GuiSetFont( Font font ) -Set gui custom font ( Global state ) +Set gui custom font ( global state ) - Failure return false - Success return true @@ -143,6 +143,7 @@ int lguiGuiSetFont( lua_State *L ) { return 1; } size_t fontId = lua_tointeger( L, 1 ); + state->guiFont = fontId; GuiSetFont( *state->fonts[ fontId ] ); lua_pushboolean( L, true ); @@ -150,6 +151,19 @@ int lguiGuiSetFont( lua_State *L ) { return 1; } +/* +> font = RL.GuiGetFont() + +Get gui custom font ( global state ) + +- Success return int +*/ +int lguiGuiGetFont( lua_State *L ) { + lua_pushinteger( L, state->guiFont ); + + return 1; +} + /* ## Gui - Style */ -- cgit v1.2.3