Skip to content

Commit 8c43225

Browse files
committed
Merge branch 'drawroundedlines' of github.com:RobLoach/raylib-cpp into next
2 parents 0b727bd + dd3b8e3 commit 8c43225

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

examples/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if (NOT raylib_FOUND)
1515
FetchContent_Declare(
1616
raylib
1717
GIT_REPOSITORY https://github.com/raysan5/raylib.git
18-
GIT_TAG f1007554a0a8145060797c0aa8169bdaf2c1c6b8
18+
GIT_TAG 785ec74
1919
GIT_SHALLOW 1
2020
)
2121
FetchContent_GetProperties(raylib)

include/Rectangle.hpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,20 @@ class Rectangle : public ::Rectangle {
8181
}
8282

8383
void DrawRoundedLines(float roundness, int segments, ::Color color) const {
84-
::DrawRectangleRoundedLines(*this, roundness, segments, color);
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
8589
}
8690

8791
void DrawRoundedLines(float roundness, int segments,
8892
float lineThick, ::Color color) const {
89-
::DrawRectangleRoundedLinesEx(*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
9098
}
9199

92100
/**

include/raylib.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extern "C" {
2727
#endif
2828

2929
#if RAYLIB_VERSION_MINOR < 1
30-
#error "raylib-cpp targets raylib 5.1 or higher."
30+
#error "raylib-cpp targets raylib 5.1 or higher."
3131
#endif
3232

3333
#ifdef __cplusplus

0 commit comments

Comments
 (0)