From 479726a5e468a2f4d0f9337f082889082e535bfb Mon Sep 17 00:00:00 2001 From: jussi Date: Wed, 20 Nov 2024 18:23:42 +0200 Subject: Initial switch to raylib 5.5. --- src/shapes.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'src/shapes.c') diff --git a/src/shapes.c b/src/shapes.c index b2bcfaf..2efa78a 100644 --- a/src/shapes.c +++ b/src/shapes.c @@ -381,18 +381,34 @@ int lshapesDrawRectangleRounded( lua_State* L ) { } /* -> RL.DrawRectangleRoundedLines( Rectangle rec, float roundness, int segments, int lineThick, Color color ) +> RL.DrawRectangleRoundedLines( Rectangle rec, float roundness, int segments, Color color ) -Draw rectangle with rounded edges outline +Draw rectangle lines with rounded edges */ int lshapesDrawRectangleRoundedLines( lua_State* L ) { Rectangle rect = uluaGetRectangle( L, 1 ); float roundness = luaL_checknumber( L, 2 ); int segments = luaL_checkinteger( L, 3 ); - int lineThick = luaL_checkinteger( L, 4 ); + Color color = uluaGetColor( L, 4 ); + + DrawRectangleRoundedLines( rect, roundness, segments, color ); + + return 0; +} + +/* +> RL.DrawRectangleRoundedLinesEx( Rectangle rec, float roundness, int segments, float lineThick, Color color ) + +Draw rectangle with rounded edges outline +*/ +int lshapesDrawRectangleRoundedLinesEx( lua_State* L ) { + Rectangle rect = uluaGetRectangle( L, 1 ); + float roundness = luaL_checknumber( L, 2 ); + int segments = luaL_checkinteger( L, 3 ); + float lineThick = luaL_checknumber( L, 4 ); Color color = uluaGetColor( L, 5 ); - DrawRectangleRoundedLines( rect, roundness, segments, lineThick, color ); + DrawRectangleRoundedLinesEx( rect, roundness, segments, lineThick, color ); return 0; } -- cgit v1.2.3