mirror of
https://github.com/osukey/osukey.git
synced 2025-06-09 05:19:11 +09:00
Rename variables to remove redundant "screen" terminology
This commit is contained in:
parent
a9c229b1ec
commit
20b43c20c8
@ -48,7 +48,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
private DependencyContainer dependencies;
|
private DependencyContainer dependencies;
|
||||||
private GameHost host;
|
private GameHost host;
|
||||||
|
|
||||||
protected override UserActivity InitialScreenActivity => new UserActivity.Editing(Beatmap.Value.BeatmapInfo);
|
protected override UserActivity InitialActivity => new UserActivity.Editing(Beatmap.Value.BeatmapInfo);
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
=> dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
=> dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
|
@ -56,25 +56,25 @@ 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
|
/// <para>This <see cref="Activity"/> will be automatically set to <see cref="InitialActivity"/> for this screen on entering unless
|
||||||
/// <see cref="ScreenActivity"/> is manually set before.</para>
|
/// <see cref="Activity"/> is manually set before.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual UserActivity InitialScreenActivity => null;
|
protected virtual UserActivity InitialActivity => null;
|
||||||
|
|
||||||
private UserActivity screenActivity;
|
private UserActivity activity;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The <see cref="UserActivity"/> for this screen.
|
/// The current <see cref="UserActivity"/> for this screen.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected UserActivity ScreenActivity
|
protected UserActivity Activity
|
||||||
{
|
{
|
||||||
get => screenActivity;
|
get => activity;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value == screenActivity) return;
|
if (value == activity) return;
|
||||||
|
|
||||||
screenActivity = value;
|
activity = value;
|
||||||
setUserActivity(screenActivity);
|
updateActivity();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ namespace osu.Game.Screens
|
|||||||
sampleExit?.Play();
|
sampleExit?.Play();
|
||||||
applyArrivingDefaults(true);
|
applyArrivingDefaults(true);
|
||||||
|
|
||||||
setUserActivity(screenActivity);
|
updateActivity();
|
||||||
|
|
||||||
base.OnResuming(last);
|
base.OnResuming(last);
|
||||||
}
|
}
|
||||||
@ -170,8 +170,8 @@ namespace osu.Game.Screens
|
|||||||
|
|
||||||
backgroundStack?.Push(localBackground = CreateBackground());
|
backgroundStack?.Push(localBackground = CreateBackground());
|
||||||
|
|
||||||
if (screenActivity == null)
|
if (activity == null)
|
||||||
ScreenActivity = InitialScreenActivity;
|
Activity = InitialActivity;
|
||||||
|
|
||||||
base.OnEntering(last);
|
base.OnEntering(last);
|
||||||
}
|
}
|
||||||
@ -190,11 +190,10 @@ namespace osu.Game.Screens
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setUserActivity(UserActivity activity)
|
private void updateActivity()
|
||||||
{
|
{
|
||||||
if (api == null) return;
|
if (api != null)
|
||||||
|
api.LocalUser.Value.Activity.Value = activity;
|
||||||
api.LocalUser.Value.Activity.Value = activity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
protected override bool AllowBackButton => false; // handled by HoldForMenuButton
|
protected override bool AllowBackButton => false; // handled by HoldForMenuButton
|
||||||
|
|
||||||
protected override UserActivity InitialScreenActivity => new UserActivity.SoloGame(Beatmap.Value.BeatmapInfo, Ruleset.Value);
|
protected override UserActivity InitialActivity => new UserActivity.SoloGame(Beatmap.Value.BeatmapInfo, Ruleset.Value);
|
||||||
|
|
||||||
public override float BackgroundParallaxAmount => 0.1f;
|
public override float BackgroundParallaxAmount => 0.1f;
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ namespace osu.Game.Screens.Play
|
|||||||
private bool hideOverlays;
|
private bool hideOverlays;
|
||||||
public override bool HideOverlaysOnEnter => hideOverlays;
|
public override bool HideOverlaysOnEnter => hideOverlays;
|
||||||
|
|
||||||
protected override UserActivity InitialScreenActivity => null; //shows the previous screen status
|
protected override UserActivity InitialActivity => null; //shows the previous screen status
|
||||||
|
|
||||||
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
public override bool AllowExternalScreenChange => true;
|
public override bool AllowExternalScreenChange => true;
|
||||||
|
|
||||||
protected override UserActivity InitialScreenActivity => new UserActivity.ChoosingBeatmap();
|
protected override UserActivity InitialActivity => new UserActivity.ChoosingBeatmap();
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
|
@ -30,18 +30,22 @@ namespace osu.Game.Users
|
|||||||
|
|
||||||
public class Editing : UserActivity
|
public class Editing : UserActivity
|
||||||
{
|
{
|
||||||
|
public BeatmapInfo Beatmap { get; }
|
||||||
|
|
||||||
public Editing(BeatmapInfo info)
|
public Editing(BeatmapInfo info)
|
||||||
{
|
{
|
||||||
Beatmap = info;
|
Beatmap = info;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Status => @"Editing a beatmap";
|
public override string Status => @"Editing a beatmap";
|
||||||
|
|
||||||
public BeatmapInfo Beatmap { get; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SoloGame : UserActivity
|
public class SoloGame : UserActivity
|
||||||
{
|
{
|
||||||
|
public BeatmapInfo Beatmap { get; }
|
||||||
|
|
||||||
|
public Rulesets.RulesetInfo Ruleset { get; }
|
||||||
|
|
||||||
public SoloGame(BeatmapInfo info, Rulesets.RulesetInfo ruleset)
|
public SoloGame(BeatmapInfo info, Rulesets.RulesetInfo ruleset)
|
||||||
{
|
{
|
||||||
Beatmap = info;
|
Beatmap = info;
|
||||||
@ -49,10 +53,6 @@ namespace osu.Game.Users
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override string Status => @"Playing alone";
|
public override string Status => @"Playing alone";
|
||||||
|
|
||||||
public BeatmapInfo Beatmap { get; }
|
|
||||||
|
|
||||||
public Rulesets.RulesetInfo Ruleset { get; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Spectating : UserActivity
|
public class Spectating : UserActivity
|
||||||
|
Loading…
x
Reference in New Issue
Block a user