Skip to content

Commit

Permalink
Merge branch 'drawroundedlines' of github.com:RobLoach/raylib-cpp int…
Browse files Browse the repository at this point in the history
…o next
  • Loading branch information
RobLoach committed May 28, 2024
2 parents 0b727bd + dd3b8e3 commit 8c43225
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if (NOT raylib_FOUND)
FetchContent_Declare(
raylib
GIT_REPOSITORY https://github.com/raysan5/raylib.git
GIT_TAG f1007554a0a8145060797c0aa8169bdaf2c1c6b8
GIT_TAG 785ec74
GIT_SHALLOW 1
)
FetchContent_GetProperties(raylib)
Expand Down
12 changes: 10 additions & 2 deletions include/Rectangle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,20 @@ class Rectangle : public ::Rectangle {
}

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

/**
Expand Down
2 changes: 1 addition & 1 deletion include/raylib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extern "C" {
#endif

#if RAYLIB_VERSION_MINOR < 1
#error "raylib-cpp targets raylib 5.1 or higher."
#error "raylib-cpp targets raylib 5.1 or higher."
#endif

#ifdef __cplusplus
Expand Down

0 comments on commit 8c43225

Please sign in to comment.