Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naive fix for TextLayout TopLeft #2875

Merged
merged 1 commit into from
Nov 20, 2023
Merged

Naive fix for TextLayout TopLeft #2875

merged 1 commit into from
Nov 20, 2023

Conversation

Denneisk
Copy link
Member

@Denneisk Denneisk commented Nov 18, 2023

Makes TextLayout centered like boxes.
This should not bother people who are using egpDrawTopLeft(1) by default. I hope. This will bother people who expected old behavior.

Todo: This sucks because MoveTopLeft undoes what this does. Maybe make MoveTopLeft a method, too?

Change default rendering to topleft by default? Maybe save that for EGPv4 (it's really annoying, though).

@thegrb93
Copy link
Contributor

This change doesn't make sense to me. Why is it centering the text when that's what the TEXT_ALIGN is supposed to do?

@Denneisk
Copy link
Member Author

Denneisk commented Nov 19, 2023

This change doesn't make sense to me. Why is it centering the text when that's what the TEXT_ALIGN is supposed to do?

The TextLayout draws from the top left. Normal Text objects center like that, but TextLayout is a box that contains text, so centering it would center at the center of the box, which is drawn top left by default currently.

@thegrb93 thegrb93 merged commit 553aabf into wiremod:master Nov 20, 2023
1 check passed
@Denneisk Denneisk deleted the egp-fix branch November 8, 2024 18:17
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