From 30c7a5eda27ef0e424bf7948e3cd37a1cf5a52ef Mon Sep 17 00:00:00 2001 From: jussi Date: Wed, 2 Oct 2024 13:02:13 +0300 Subject: GuiSetSliderDragging, GuiGetSliderDragging, GuiSetSliderActive and GuiGetSliderActive. --- src/rgui.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) (limited to 'src/rgui.c') diff --git a/src/rgui.c b/src/rgui.c index 106180e..f1532a3 100644 --- a/src/rgui.c +++ b/src/rgui.c @@ -116,6 +116,58 @@ int lguiGuiGetState( lua_State* L ) { return 1; } +/* +> RL.GuiSetSliderDragging() + +Set guiSliderDragging +*/ +int lguiGuiSetSliderDragging( lua_State* L ) { + bool dragging = lua_toboolean( L, 1 ); + + GuiSetSliderDragging( dragging ); + + return 0; +} + +/* +> isSliderDragging = RL.GuiGetSliderDragging() + +Get guiSliderDragging + +- Success return bool +*/ +int lguiGuiGetSliderDragging( lua_State* L ) { + lua_pushboolean( L, GuiGetSliderDragging() ); + + return 1; +} + +/* +> RL.GuiSetSliderActive() + +Set guiSliderActive +*/ +int lguiGuiSetSliderActive( lua_State* L ) { + Rectangle rect = uluaGetRectangle( L, 1 ); + + GuiSetSliderActive( rect ); + + return 0; +} + +/* +> isSliderDragging = RL.GuiGetSliderActive() + +Get guiSliderActive + +- Success return Rectangle +*/ +int lguiGuiGetSliderActive( lua_State* L ) { + uluaPushRectangle( L, GuiGetSliderActive() ); + + return 1; +} + /* ## Gui - Font set/get functions */ @@ -203,7 +255,6 @@ int lguiGuiLoadStyle( lua_State* L ) { return 1; } - // state->guiFont = GuiGetFont(); TraceLog( state->logLevelInvalid, "Invalid file '%s'", lua_tostring( L, 1 ) ); lua_pushnil( L ); -- cgit v1.2.3