From dd3b8e34d57cb2cc78e2ac9b0623a64e16293d61 Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Tue, 28 May 2024 11:49:47 -0400 Subject: [PATCH] Clean up DrawRectangleRoundedLines --- include/Rectangle.hpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/Rectangle.hpp b/include/Rectangle.hpp index c234538d..df7d4598 100644 --- a/include/Rectangle.hpp +++ b/include/Rectangle.hpp @@ -80,9 +80,21 @@ class Rectangle : public ::Rectangle { ::DrawRectangleRounded(*this, roundness, segments, color); } + void DrawRoundedLines(float roundness, int segments, ::Color color) const { + #if RAYLIB_VERSION_MAJOR == 5 && RAYLIB_VERSION_MINOR == 0 + ::DrawRectangleRoundedLines(*this, roundness, segments, 1.0f, color); + #else + ::DrawRectangleRoundedLines(*this, roundness, segments, color); + #endif + } + void DrawRoundedLines(float roundness, int segments, float lineThick, ::Color color) const { - ::DrawRectangleRoundedLines(*this, roundness, segments, lineThick, color); + #if RAYLIB_VERSION_MAJOR == 5 && RAYLIB_VERSION_MINOR == 0 + ::DrawRectangleRoundedLines(*this, roundness, segments, lineThick, color); + #else + DrawRectangleRoundedLinesEx(*this, roundness, segments, lineThick, color); + #endif } /**