mirror of
https://github.com/ppy/osu.git
synced 2025-03-21 15:07:23 +08:00
simplify offset calculation for background
This commit is contained in:
parent
7cbf271645
commit
68a00235b9
@ -274,12 +274,12 @@ namespace osu.Game
|
||||
|
||||
Action<Visibility> stateChanged = delegate
|
||||
{
|
||||
float offset = intro.X;
|
||||
float offset = 0;
|
||||
|
||||
if (settings.State == Visibility.Hidden || notifications.State == Visibility.Visible)
|
||||
offset -= ToolbarButton.WIDTH / 2;
|
||||
else if (settings.State == Visibility.Visible || notifications.State == Visibility.Hidden)
|
||||
if (settings.State == Visibility.Visible)
|
||||
offset += ToolbarButton.WIDTH / 2;
|
||||
if (notifications.State == Visibility.Visible)
|
||||
offset -= ToolbarButton.WIDTH / 2;
|
||||
|
||||
intro.MoveToX(offset, SettingsOverlay.TRANSITION_LENGTH, Easing.OutQuint);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user