mirror of
https://github.com/osukey/osukey.git
synced 2025-07-04 01:40:02 +09:00
Adjust settings panel to autosize to zero when hiding it
Previously, when hiding the settings overlay, it remains to have a width of `56` (sidebar width), this is due to the panel content being placed next to the sidebar, so therefore the content has to move 400 (PANEL_WIDTH) + 56 (sidebar_width) backwards, for the overlay to have a width of 0 on hide.
This commit is contained in:
@ -69,7 +69,7 @@ namespace osu.Game.Overlays
|
||||
Sidebar?.FadeColour(Color4.DarkGray, 300, Easing.OutQuint);
|
||||
|
||||
SectionsContainer.FadeOut(300, Easing.OutQuint);
|
||||
ContentContainer.MoveToX(-WIDTH, 500, Easing.OutQuint);
|
||||
ContentContainer.MoveToX(-PANEL_WIDTH, 500, Easing.OutQuint);
|
||||
|
||||
lastOpenedSubPanel = panel;
|
||||
break;
|
||||
@ -83,7 +83,7 @@ namespace osu.Game.Overlays
|
||||
}
|
||||
}
|
||||
|
||||
protected override float ExpandedPosition => lastOpenedSubPanel?.State.Value == Visibility.Visible ? -WIDTH : base.ExpandedPosition;
|
||||
protected override float ExpandedPosition => lastOpenedSubPanel?.State.Value == Visibility.Visible ? -PANEL_WIDTH : base.ExpandedPosition;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
|
Reference in New Issue
Block a user