mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Set ScreenActivity to InitialScreenActivity only when ScreenActivity hasn't been set manually before.
This commit is contained in:
@ -56,9 +56,13 @@ namespace osu.Game.Screens
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The <see cref="UserActivity"/> to set the user's activity automatically to when this screen is entered
|
/// 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>
|
/// </summary>
|
||||||
protected virtual UserActivity InitialScreenActivity => null;
|
protected virtual UserActivity InitialScreenActivity => null;
|
||||||
|
|
||||||
|
private UserActivity screenActivity;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The <see cref="UserActivity"/> for this screen.
|
/// The <see cref="UserActivity"/> for this screen.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -74,8 +78,6 @@ namespace osu.Game.Screens
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private UserActivity screenActivity;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether to disallow changes to game-wise Beatmap/Ruleset bindables for this screen (and all children).
|
/// Whether to disallow changes to game-wise Beatmap/Ruleset bindables for this screen (and all children).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -170,7 +172,8 @@ namespace osu.Game.Screens
|
|||||||
|
|
||||||
backgroundStack?.Push(localBackground = CreateBackground());
|
backgroundStack?.Push(localBackground = CreateBackground());
|
||||||
|
|
||||||
ScreenActivity = InitialScreenActivity;
|
if (screenActivity == null)
|
||||||
|
ScreenActivity = InitialScreenActivity;
|
||||||
|
|
||||||
base.OnEntering(last);
|
base.OnEntering(last);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user