-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Replace local footer in existing sheared overlays (e.g. mod select & first-run setup) with ScreenFooter
#28683
Conversation
…erlays and improve UX With this new order, the logo can be easily moved to display in front of the footer in `SongSelectV2` without breaking experience when footer-based overlays are present. Such overlays (i.e. mod select overlay) will also be dimmed alongside the current screen when a game-wide overlay is open (e.g. settings).
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.
Tests need fixing too
osu.Game/OsuGame.cs
Outdated
@@ -290,6 +297,8 @@ public void CloseAllOverlays(bool hideToolbar = true) | |||
if (hideToolbar) Toolbar.Hide(); | |||
} | |||
|
|||
public void ChangeLogoDepth(bool inFrontOfFooter) => ScreenContainer.ChangeChildDepth(logoContainer, inFrontOfFooter ? float.MinValue : 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.
I dunno about this. I'd rather just see it using Parent
access similar to other usages in LogoTrackingContainer
...
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.
I don't follow what you mean by "Parent
access".
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.
Parent.ChangeChildDepth
rather than OsuGame
method.
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.
Well...the drawable which its depth is being changed here is the parent of OsuLogo
, meaning that this method is the equivalent of logo.Parent.Parent.ChangeChildDepth(logo.Parent, float.MinValue)
, and not to mention that I can't access ChangeChildDepth
directly without direct-casting to Container
first. That's why I settled for an OsuGame
method to ease my head.
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.
Right. It's still not great. See if you can find a nicer way of doing this, else I'll take a look during next review pass.
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.
I have already spent hours before making this PR trying to figure out how to fix this issue of the logo depth being a nuisance in the user's experience, but I'll try once more and see if I have a clever idea this time.
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.
In case it helps, here's a description for the purpose of this code.
By default, this is how I intend these drawables to be ordered depth-wise from back to front:
- The screen content
- The osu! logo
- Footer-based overlays (e.g. mod select overlay / first-run setup overlay)
- The screen footer
- Screen-wide overlays (basically all overlays)
The logo is intentionally placed behind footer-based overlays and the screen footer, so that opening first-run setup in main menu does not get covered by the logo in main menu (visually and/or input-wise).
Now, this does not work well in new song select, because I want the logo to appear in front of the footer, and that is where the nuisance is.
So to simplify matters, I chose to define a method at OsuGame
that changes the depth of the logo to appear in front of footer stuff, and use it when wanting to attach the logo to the footer.
Proxying does not help as it only changes the depth of the logo visually, it does not affect order in input queue (supposedly intentional).
…er content Identified by tests. See https://github.com/ppy/osu/actions/runs/9869382635/job/27253010485 & https://github.com/ppy/osu/actions/runs/9869382635/job/27253009622. This change also prevents the initial `PopOut` call in overlays from calling `clearActiveOverlayContainer`, since it's not in the update thread and it's never meant to be called at that point anyway (it's supposed to be accompanied by a previous `PopIn` call adding the footer content).
I've applied a minor refactor on the footer content flow between |
@frenzibyte this is still failing tests. please run them locally. |
Right, my apologies. |
cd88985
to
9a1939a
Compare
Gonna get this in. It seems okay enough to move forward with. |
ScreenFooter
to house footer content of sheared overlays #28682Preview:
CleanShot.2024-06-30.at.07.34.43-converted.mp4
CleanShot.2024-06-30.at.07.19.03.mp4