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

GUI: Snap CharFX offset to nearest pixel when setting is enabled #79705

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

398utubzyt
Copy link
Contributor

Rounds fx_offset to the nearest pixel when the viewport's is_snap_controls_to_pixels_enabled is true.

Snap enabled:

charfx_snapped.mp4

Snap disabled/without fix:

charfx_nosnap.mp4

@398utubzyt 398utubzyt requested a review from a team as a code owner July 20, 2023 12:42
@Calinou
Copy link
Member

Calinou commented Jul 20, 2023

I think this should depend on the Snap 2D Transforms to Pixel property, rather than Snap Controls to Pixels.

When using the canvas_items stretch mode and a resolution higher than the base window size, it's sometimes desired to have smooth undulating text. Not all games have a pixel art style, yet you almost always want Snap Controls to Pixels to be on to avoid blurry controls 🙂

@398utubzyt
Copy link
Contributor Author

Makes sense to me. I forgot control snapping is on by default. I've gone ahead and fixed that.

@398utubzyt 398utubzyt force-pushed the gui/snap-charfx-fix branch from e8ffed9 to aac2dfc Compare July 20, 2023 13:01
@Chaosus Chaosus added this to the 4.2 milestone Jul 21, 2023
@akien-mga akien-mga merged commit 3e958cf into godotengine:master Aug 2, 2023
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

5 participants