mirror of
https://github.com/ppy/osu
synced 2024-12-13 10:28:17 +00:00
Set ScreenActivity to InitialScreenActivity only when ScreenActivity hasn't been set manually before.
This commit is contained in:
parent
141775d98c
commit
6c74998487
@ -56,9 +56,13 @@ namespace osu.Game.Screens
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="UserActivity"/> to set the user's activity automatically to when this screen is entered
|
||||
/// <para>This <see cref="ScreenActivity"/> will be automatically set to <see cref="InitialScreenActivity"/> for this screen on entering unless
|
||||
/// <see cref="ScreenActivity"/> is manually set before.</para>
|
||||
/// </summary>
|
||||
protected virtual UserActivity InitialScreenActivity => null;
|
||||
|
||||
private UserActivity screenActivity;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="UserActivity"/> for this screen.
|
||||
/// </summary>
|
||||
@ -74,8 +78,6 @@ namespace osu.Game.Screens
|
||||
}
|
||||
}
|
||||
|
||||
private UserActivity screenActivity;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to disallow changes to game-wise Beatmap/Ruleset bindables for this screen (and all children).
|
||||
/// </summary>
|
||||
@ -170,7 +172,8 @@ namespace osu.Game.Screens
|
||||
|
||||
backgroundStack?.Push(localBackground = CreateBackground());
|
||||
|
||||
ScreenActivity = InitialScreenActivity;
|
||||
if (screenActivity == null)
|
||||
ScreenActivity = InitialScreenActivity;
|
||||
|
||||
base.OnEntering(last);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user