Nickez/ugui no inverse#1975
Open
NickeZ wants to merge 5 commits into
Open
Conversation
Replace the text-specific inverted flag with a temporary 180-degree UG rendering transform. Use the component helper to rotate the orientation screen top button while keeping normal text drawing APIs. Update C and Rust call sites and add coverage for pixel and component rotation.
Drop the unused UG_PutCharTransparent entry point and the now-constant transparent flag from the private character renderer.
Replace defensive null-check returns in ugui.c with ASSERT() calls. ASSERT is already compiled as a no-op outside DEBUG builds, so release behavior no longer carries the extra null-check branches.
894c10a to
c63cd97
Compare
Render the orientation screen's reverse logo state by rotating the existing logo component 180 degrees instead of keeping a second reversed bitmap and component.
Set up a minimal ugui instance for UI component tests that create labels. Label sizing now relies on ugui being initialized because ugui null guards are debug assertions instead of release-time early returns.
benma
approved these changes
May 18, 2026
Collaborator
benma
left a comment
There was a problem hiding this comment.
I'd prefer keeping the NULL checks, they don't really hurt right? And if a refactor or sth smuggles in a NULL it would help.
Fyi: the rotated orientation screen label is not exactly the same as before, but moved by one pixel:
Measured ink bounding boxes:
before top: x=35..95, y=1..10
before bottom: x=33..93, y=54..63
after top: x=34..94, y=0..9
after bottom: x=33..93, y=54..63
orientation_tap_before_323f_parent.bmp
orientation_tap_after_323f.bmp
I guess that is better than before, now it actually looks the same when viewed from either side.
tACK
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.
I want to remove inverted because multi-byte encodings like utf8 are not trivial to traverse backwards.
remove inverted, transparent and null checks in release mode.
These all are things that we have added and are not part of the original ugui:
https://github.com/achimdoebler/UGUI/blob/ce0bccb5b7d4877c42081419fccadf7aa5727303/ugui.c#L60