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

[WIP] Add GUI scale setting to options #90

Merged
merged 4 commits into from
Mar 12, 2024

Conversation

grgp
Copy link
Contributor

@grgp grgp commented Mar 1, 2024

Addresses #81

Added slider here:
godot-screenshot-gui

Changed project settings:
image

I used the official examples repo here as a reference. Still marking it as a work in progress because I haven't handled the case if the player simply clicks—not drag—the slider button.

It works right now, but it's kind of wonky.

@Phazorknight Phazorknight added the enhancement New feature or request label Mar 1, 2024
@Phazorknight
Copy link
Owner

This is pretty sweet! Dragging as well as just clicking worked when I tested this just now.

I don't know much about Godot's UI / 2D Handling, but everything got quite pixelated or aliased if it wasn't in just the right scale, and that scale changes with the selected resolution (understandably).

Best results for me were:
Res 1280x800 - Scale 1.0
Res 1440x900 - Scale 0.9 (though not quite perfect)
Res 1600x900 - Scale 0.8
Res 1920x1080 - Scale 0.65 (though also some aliasing)

My assumption is that the scale value would probably have to "snap" to ones that can supply the right pixel alignments that also fits the selected resolution. Since 1920x1080 is the most common one, that's probably the base to start from.

@grgp
Copy link
Contributor Author

grgp commented Mar 2, 2024

Ah nice findings! Huh this is where my knowledge runs out tbh. I would assume since the 2D elements are from built-in Godot (vector and text, instead of image textures), it would scale perfectly no matter what scale we give it.

I'll leave this PR open for now in case anyone else has ideas. I'll ask on the Godot Discord, actually.

@Phazorknight Phazorknight merged commit 0099791 into Phazorknight:main Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants