Skip to content

[examples] Added shapes_drag_puzzle - #6165

Merged
raysan5 merged 3 commits into
raysan5:masterfrom
gabriel-piangers:new_example
Sep 20, 2026
Merged

raysan5 merged 3 commits into
raysan5:masterfrom
gabriel-piangers:new_example

Conversation

@gabriel-piangers

Copy link
Copy Markdown
Contributor

Added a drag and drop puzzle example implementing 3 different shapes, Rectangle, Circle and Triangle.

Added for the discussion #5209.

I have tested it on Windows and seems to work fine. Only thing that bothered me a little is that the drawing order for the shapes is fixed instead of being based on the order of latest pick. Not really sure this could be done easily since all objects are from different types. But I still made it so the dragged object always draws last.

I have used the rexm tool to add the example as suggested.

core_shapes_drag_puzzle

@raysan5

raysan5 commented Sep 19, 2026

Copy link
Copy Markdown
Owner

@gabriel-piangers please, review code formating to follow raylib conventions, braces should be aligned

EDIT: Please, rename to just shapes_drag_puzzle and move to shapes category, it does not belong to core.

@raysan5 raysan5 changed the title Added shapes drag puzzle example [examples] Added shapes_drag_puzzle Sep 19, 2026
@gabriel-piangers

Copy link
Copy Markdown
Contributor Author

@gabriel-piangers please, review code formating to follow raylib conventions, braces should be aligned

EDIT: Please, rename to just shapes_drag_puzzle and move to shapes category, it does not belong to core.

I changed the code formatting accordingly to the raylib conventions and switched it to shapes category.

@raysan5
raysan5 merged commit 425e58c into raysan5:master Sep 20, 2026
@raysan5

raysan5 commented Sep 20, 2026

Copy link
Copy Markdown
Owner

@gabriel-piangers thanks! great addition! 👍😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants