-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Scale HUD proportionally when resizing window #15
base: main
Are you sure you want to change the base?
Conversation
src/hud/widgets_hud.rs
Outdated
ui_scale_x: 0.0, | ||
ui_scale_y: 0.0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it'd be nice to default these to the UI_SCALE_{X,Y}
constants? That'll make sure that WidgetsHud
is in an operable state right after new
'ing it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to think of a way to only need to set the aspect ratio instead of scale_x and scale_y
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds even better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scale_x is just used in so many places and that would be replaced by scale_y / ratio
which wouldn't actually work if we want to support the toolbar shrinking when the window width is too small. Currently I check if the toolbar would be clipped and then shrink it. We could just ignore that case
Did a lot of debatable things in here, please roast.
scales well now, fixes #9