Make opening options shift the rest of the screen as per design.

This commit is contained in:
Dean Herbert
2016-11-30 18:28:08 +09:00
parent c26587ec3a
commit 481b9d3208
2 changed files with 27 additions and 9 deletions

View File

@ -19,6 +19,7 @@ using osu.Framework.Logging;
using osu.Game.Graphics.UserInterface.Volume;
using osu.Game.Database;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Transformations;
using osu.Game.Modes;
using osu.Game.Screens;
using osu.Game.Screens.Menu;
@ -132,6 +133,19 @@ namespace osu.Game
overlayContent.Add(Toolbar);
});
Options.StateChanged += delegate
{
switch (Options.State)
{
case Visibility.Hidden:
intro.MoveToX(0, OptionsOverlay.TRANSITION_LENGTH, EasingTypes.OutQuint);
break;
case Visibility.Visible:
intro.MoveToX(OptionsOverlay.SIDEBAR_WIDTH / 2, OptionsOverlay.TRANSITION_LENGTH, EasingTypes.OutQuint);
break;
}
};
Cursor.Alpha = 0;
}