Change settings overlay to always show expanded buttons

This commit is contained in:
Dean Herbert 2023-12-27 02:33:17 +09:00
parent 58476d5429
commit 9a1a97180d
No known key found for this signature in database
3 changed files with 8 additions and 3 deletions

View File

@ -13,9 +13,12 @@ namespace osu.Game.Overlays.Settings
public const float DEFAULT_WIDTH = 70;
public const int EXPANDED_WIDTH = 200;
protected override bool ExpandOnHover => false;
public SettingsSidebar()
: base(DEFAULT_WIDTH, EXPANDED_WIDTH)
{
Expanded.Value = true;
}
[BackgroundDependencyLoader]

View File

@ -72,16 +72,19 @@ namespace osu.Game.Overlays
switch (state.NewValue)
{
case Visibility.Visible:
Sidebar?.FadeColour(Color4.DarkGray, 300, Easing.OutQuint);
Sidebar.Expanded.Value = false;
Sidebar.FadeColour(Color4.DarkGray, 300, Easing.OutQuint);
SectionsContainer.FadeOut(300, Easing.OutQuint);
ContentContainer.MoveToX(-PANEL_WIDTH, 500, Easing.OutQuint);
lastOpenedSubPanel = panel;
break;
case Visibility.Hidden:
Sidebar?.FadeColour(Color4.White, 300, Easing.OutQuint);
Sidebar.Expanded.Value = true;
Sidebar.FadeColour(Color4.White, 300, Easing.OutQuint);
SectionsContainer.FadeIn(500, Easing.OutQuint);
ContentContainer.MoveToX(0, 500, Easing.OutQuint);

View File

@ -285,7 +285,6 @@ namespace osu.Game.Overlays
return;
SectionsContainer.ScrollTo(section);
Sidebar.Expanded.Value = false;
},
};
}