diff options
| author | jussi | 2024-10-02 13:02:13 +0300 |
|---|---|---|
| committer | jussi | 2024-10-02 13:02:13 +0300 |
| commit | 30c7a5eda27ef0e424bf7948e3cd37a1cf5a52ef (patch) | |
| tree | fef0f62ff4206c2fc9548a12e4745ace3e7967d3 /src | |
| parent | d3202073a72b4ff0f98c29cdb096e2747dbaaae8 (diff) | |
| download | reilua-enhanced-30c7a5eda27ef0e424bf7948e3cd37a1cf5a52ef.tar.gz reilua-enhanced-30c7a5eda27ef0e424bf7948e3cd37a1cf5a52ef.tar.bz2 reilua-enhanced-30c7a5eda27ef0e424bf7948e3cd37a1cf5a52ef.zip | |
GuiSetSliderDragging, GuiGetSliderDragging, GuiSetSliderActive and GuiGetSliderActive.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lua_core.c | 4 | ||||
| -rw-r--r-- | src/rgui.c | 53 |
2 files changed, 56 insertions, 1 deletions
diff --git a/src/lua_core.c b/src/lua_core.c index 508158d..94c2134 100644 --- a/src/lua_core.c +++ b/src/lua_core.c @@ -2075,6 +2075,10 @@ void luaRegister() { assingGlobalFunction( "GuiSetAlpha", lguiGuiSetAlpha ); assingGlobalFunction( "GuiSetState", lguiGuiSetState ); assingGlobalFunction( "GuiGetState", lguiGuiGetState ); + assingGlobalFunction( "GuiSetSliderDragging", lguiGuiSetSliderDragging ); + assingGlobalFunction( "GuiGetSliderDragging", lguiGuiGetSliderDragging ); + assingGlobalFunction( "GuiSetSliderActive", lguiGuiSetSliderActive ); + assingGlobalFunction( "GuiGetSliderActive", lguiGuiGetSliderActive ); /* Font set/get functions. */ assingGlobalFunction( "GuiSetFont", lguiGuiSetFont ); assingGlobalFunction( "GuiGetFont", lguiGuiGetFont ); @@ -117,6 +117,58 @@ int lguiGuiGetState( lua_State* L ) { } /* +> 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 ); |
