1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 03:02:54 +08:00

Sidebar now pushes full settings out further

This commit is contained in:
Dean Herbert 2017-07-13 16:26:40 +09:00
parent 61c45b0b44
commit 8460e29bcb
2 changed files with 10 additions and 3 deletions

View File

@ -50,10 +50,10 @@ namespace osu.Game.Overlays.Settings
protected override bool OnHover(InputState state) protected override bool OnHover(InputState state)
{ {
expandEvent?.Cancel();
expandEvent = Scheduler.AddDelayed(() => expandEvent = Scheduler.AddDelayed(() =>
{ {
expandEvent = null; ResizeTo(new Vector2(EXPANDED_WIDTH, Height), 500, EasingTypes.OutQuint);
ResizeTo(new Vector2(EXPANDED_WIDTH, Height), 150, EasingTypes.OutQuad);
}, 750); }, 750);
return true; return true;
} }
@ -61,7 +61,7 @@ namespace osu.Game.Overlays.Settings
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(InputState state)
{ {
expandEvent?.Cancel(); expandEvent?.Cancel();
ResizeTo(new Vector2(DEFAULT_WIDTH, Height), 150, EasingTypes.OutQuad); ResizeTo(new Vector2(DEFAULT_WIDTH, Height), 500, EasingTypes.OutQuint);
base.OnHoverLost(state); base.OnHoverLost(state);
} }

View File

@ -148,6 +148,13 @@ namespace osu.Game.Overlays
base.OnFocus(state); base.OnFocus(state);
} }
protected override void UpdateAfterChildren()
{
base.UpdateAfterChildren();
sectionsContainer.Margin = new MarginPadding { Left = sidebar.DrawWidth };
}
private class SettingsSectionsContainer : SectionsContainer private class SettingsSectionsContainer : SectionsContainer
{ {
public SearchContainer SearchContainer; public SearchContainer SearchContainer;