mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 21:13:20 +08:00
Fix screen offsetting not handling scaled game instances
By using `Content` instead, now the logic will get the X of the settings overlay at the `Content` space, which can be scaled in the `ScalingMode.Everything` mode. And in the case of `ScalingMode.ExcludeOverlays`, a subcontainer somewhere inside `Content` that's holding the screen stack would be scaled, but `Content` won't be affected which is what we want in that case.
This commit is contained in:
parent
d3dba296d6
commit
20f193c1c2
@ -1019,9 +1019,9 @@ namespace osu.Game
|
||||
var horizontalOffset = 0f;
|
||||
|
||||
if (Settings.IsLoaded && Settings.IsPresent)
|
||||
horizontalOffset += ToLocalSpace(Settings.ScreenSpaceDrawQuad.TopRight).X * SIDE_OVERLAY_OFFSET_RATIO;
|
||||
horizontalOffset += Content.ToLocalSpace(Settings.ScreenSpaceDrawQuad.TopRight).X * SIDE_OVERLAY_OFFSET_RATIO;
|
||||
if (Notifications.IsLoaded && Notifications.IsPresent)
|
||||
horizontalOffset += (ToLocalSpace(Notifications.ScreenSpaceDrawQuad.TopLeft).X - DrawWidth) * SIDE_OVERLAY_OFFSET_RATIO;
|
||||
horizontalOffset += (Content.ToLocalSpace(Notifications.ScreenSpaceDrawQuad.TopLeft).X - Content.DrawWidth) * SIDE_OVERLAY_OFFSET_RATIO;
|
||||
|
||||
ScreenOffsetContainer.X = horizontalOffset;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user