Skip to content

Commit 6a5286c

Browse files
authored
Merge pull request #320 from RobLoach/drawroundedlines
Fix compatibility with DrawRectangleRoundedLines
2 parents 3b8fe30 + dd3b8e3 commit 6a5286c

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

include/Rectangle.hpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,21 @@ class Rectangle : public ::Rectangle {
8080
::DrawRectangleRounded(*this, roundness, segments, color);
8181
}
8282

83+
void DrawRoundedLines(float roundness, int segments, ::Color color) const {
84+
#if RAYLIB_VERSION_MAJOR == 5 && RAYLIB_VERSION_MINOR == 0
85+
::DrawRectangleRoundedLines(*this, roundness, segments, 1.0f, color);
86+
#else
87+
::DrawRectangleRoundedLines(*this, roundness, segments, color);
88+
#endif
89+
}
90+
8391
void DrawRoundedLines(float roundness, int segments,
8492
float lineThick, ::Color color) const {
85-
::DrawRectangleRoundedLines(*this, roundness, segments, lineThick, color);
93+
#if RAYLIB_VERSION_MAJOR == 5 && RAYLIB_VERSION_MINOR == 0
94+
::DrawRectangleRoundedLines(*this, roundness, segments, lineThick, color);
95+
#else
96+
DrawRectangleRoundedLinesEx(*this, roundness, segments, lineThick, color);
97+
#endif
8698
}
8799

88100
/**

0 commit comments

Comments
 (0)