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

Add setting to allow forcing the game to draw over notches / cameras #20983

Merged
merged 3 commits into from
Oct 29, 2022

Conversation

peppy
Copy link
Sponsor Member

@peppy peppy commented Oct 28, 2022

Setting will only show up when running on a device that exposes safe areas.

Addresses a common point of user contention as seen by the following discussions (and probably more):
#20970
#15506
#19737
#17769
#18395

Copy link
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code seems sane - mostly tested via test scene, not tested on device, so there's a chance the toggle may not appear but looks like it should

Copy link
Member

@frenzibyte frenzibyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on iOS, works as promised.

Comment on lines +247 to +250
if (host.Window?.SafeAreaPadding.Value.Total != Vector2.Zero)
safeAreaConsiderationsCheckbox.Show();
else
safeAreaConsiderationsCheckbox.Hide();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly safer to update visibility based on value changes to host.Window.SafeAreaPadding in case it gets updated later than the display.

Comment on lines +106 to +110
safeAreaConsiderationsCheckbox = new SettingsCheckbox
{
LabelText = "Shrink game to avoid cameras and notches",
Current = osuConfig.GetBindable<bool>(OsuSetting.SafeAreaConsiderations),
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The position of the checkbox feels weird, it's placed above more general options like "UI scaling" and "Screen scaling":

IMG_3347

Think it would be better having it at the bottom instead?

Copy link
Collaborator

@bdach bdach Oct 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disagree. This only shows on mobile. It makes sense for it to be the topmost setting there for me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the padding is what makes it look weird. Dunno.

@bdach bdach enabled auto-merge October 29, 2022 11:19
@bdach bdach merged commit 933d1d5 into ppy:master Oct 29, 2022
@peppy peppy deleted the safe-area-toggle branch November 2, 2022 02:51
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.

None yet

3 participants