Replace raylib drawing methods with citrus-engine BatchRenderer API#125
Draft
Replace raylib drawing methods with citrus-engine BatchRenderer API#125
Conversation
…ngine BatchRenderer Co-authored-by: adam4813 <3011917+adam4813@users.noreply.github.com>
- Converted all DrawRectangle calls to BatchRenderer::SubmitQuad - Converted all DrawText calls to BatchRenderer::SubmitText - Converted all DrawRectangleLines calls to 4 SubmitLine calls for borders - Used engine::ui::Color for color conversion Co-authored-by: adam4813 <3011917+adam4813@users.noreply.github.com>
…chRenderer - Converted placement_system.cpp DrawRectangle/DrawText calls to BatchRenderer - Completed tooltip.cpp conversion (last DrawRectangleLines call) - All core UI components now use BatchRenderer except save_load_menu.cpp Co-authored-by: adam4813 <3011917+adam4813@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Replace raylib drawing methods with batch renderer equivalents
Replace raylib drawing methods with citrus-engine BatchRenderer API
Jan 4, 2026
- Add Initialize() and Shutdown() methods following the pattern from AchievementsMenu and ModsMenu - Replace manual BatchRenderer drawing with Panel, Button, Text, Container, and ContainerBuilder UI components - Add ProcessMouseEvent() for proper event handling through the UI tree - Use VerticalLayout and HorizontalLayout for automatic child positioning - Add ScrollComponent for scrollable notification list - Maintain backward-compatible HandleClick() for legacy callers - Keep toast rendering using BatchRenderer (appropriate for transient overlays) - Update HUD to call Initialize() on NotificationCenter creation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Converting UI rendering from raylib's immediate-mode drawing API to citrus-engine's batch renderer in preparation for full raylib deprecation.
Changes
Converted Files
API Mapping
Missing Features in Citrus Engine
Circle Drawing -
DrawCirclehas no BatchRenderer equivalent. Approximating with square quads (affects notification badges).Rectangle Borders -
DrawRectangleLinesrequires 4 separateSubmitLinecalls instead of single-call border drawing.Deferred
save_load_menu.cpp - Low priority (save/load UI only), can convert separately if needed.
Original prompt
Created from Copilot CLI via the copilot delegate command.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.