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

[SimpleUI] UIResolutionScale is not reliable for scaling non-16:9 aspect ratios #14

Closed
Flintlocket opened this issue Oct 20, 2019 · 0 comments

Comments

@Flintlocket
Copy link

Flintlocket commented Oct 20, 2019

Oops turns out I had HUD scaling off which made SimpleUI components look out of place (fonts were being scaled up but widgets were not).

The font size issue is probably because the font template uses width instead of height.

local size = screen_w / 100

Idk if this is worth changing.


SimpleUI position and size values are scaled like so:

The issue is that UIResolutionScale returns a single value and assumes the screen is 16:9.

A friend and I have non-standard aspects (21:9, 32:9) - wider than 1080p but the same height. The result is that the scaling is wrong. For example, on 3840x1080, UIResolutionScale returns 2, which is correct for width but not for height.

This can be resolved by calculating scale as two values

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

No branches or pull requests

1 participant