Skip to content

[examples] Move redundant DrawText calls outside loop in core_random_sequence.c - #6432

Merged
raysan5 merged 1 commit into
raysan5:masterfrom
LeadHood:patch-2
Nov 20, 2026
Merged

raysan5 merged 1 commit into
raysan5:masterfrom
LeadHood:patch-2

Conversation

@LeadHood

Copy link
Copy Markdown
Contributor

Problem

The example draws the text for the controls inside the for-loop, which is unnecessary work, especially in an example for teaching.

Solution

I moved the calls outside the for-loop, so it does not draw an extensive amount of times.

The example draws the text for the controls inside the for-loop, which is bad practice. Instead I moved it outside the for-loop, so it does not draw that text the amount of rectangles times.
@raysan5
raysan5 merged commit a6b2af8 into raysan5:master Nov 20, 2026
@raysan5

raysan5 commented Nov 20, 2026

Copy link
Copy Markdown
Owner

@LeadHood Good catch! Thanks for the review!

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