mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
simplify offset calculation for background
This commit is contained in:
@ -274,12 +274,12 @@ namespace osu.Game
|
|||||||
|
|
||||||
Action<Visibility> stateChanged = delegate
|
Action<Visibility> stateChanged = delegate
|
||||||
{
|
{
|
||||||
float offset = intro.X;
|
float offset = 0;
|
||||||
|
|
||||||
if (settings.State == Visibility.Hidden || notifications.State == Visibility.Visible)
|
if (settings.State == Visibility.Visible)
|
||||||
offset -= ToolbarButton.WIDTH / 2;
|
|
||||||
else if (settings.State == Visibility.Visible || notifications.State == Visibility.Hidden)
|
|
||||||
offset += ToolbarButton.WIDTH / 2;
|
offset += ToolbarButton.WIDTH / 2;
|
||||||
|
if (notifications.State == Visibility.Visible)
|
||||||
|
offset -= ToolbarButton.WIDTH / 2;
|
||||||
|
|
||||||
intro.MoveToX(offset, SettingsOverlay.TRANSITION_LENGTH, Easing.OutQuint);
|
intro.MoveToX(offset, SettingsOverlay.TRANSITION_LENGTH, Easing.OutQuint);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user