mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 02:32:59 +08:00
Nest all UserActivities into UserActivity
This commit is contained in:
parent
5ac6bd8204
commit
55663b3576
@ -48,7 +48,7 @@ namespace osu.Game.Screens.Edit
|
||||
private DependencyContainer dependencies;
|
||||
private GameHost host;
|
||||
|
||||
protected override UserActivity InitialScreenActivity => new UserActivityEditing(Beatmap.Value.BeatmapInfo);
|
||||
protected override UserActivity InitialScreenActivity => new UserActivity.UserActivityEditing(Beatmap.Value.BeatmapInfo);
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
=> dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
protected override bool AllowBackButton => false; // handled by HoldForMenuButton
|
||||
|
||||
protected override UserActivity InitialScreenActivity => new UserActivitySoloGame(Beatmap.Value.BeatmapInfo, Ruleset.Value);
|
||||
protected override UserActivity InitialScreenActivity => new UserActivity.UserActivitySoloGame(Beatmap.Value.BeatmapInfo, Ruleset.Value);
|
||||
|
||||
public override float BackgroundParallaxAmount => 0.1f;
|
||||
|
||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
public override bool AllowExternalScreenChange => true;
|
||||
|
||||
protected override UserActivity InitialScreenActivity => new UserActivityChoosingBeatmap();
|
||||
protected override UserActivity InitialScreenActivity => new UserActivity.UserActivityChoosingBeatmap();
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
|
@ -11,58 +11,59 @@ namespace osu.Game.Users
|
||||
{
|
||||
public abstract string Status { get; }
|
||||
public virtual Color4 GetAppropriateColour(OsuColour colours) => colours.GreenDarker;
|
||||
}
|
||||
|
||||
public class UserActivityModding : UserActivity
|
||||
{
|
||||
public override string Status => "Modding a map";
|
||||
public override Color4 GetAppropriateColour(OsuColour colours) => colours.PurpleDark;
|
||||
}
|
||||
|
||||
public class UserActivityChoosingBeatmap : UserActivity
|
||||
{
|
||||
public override string Status => "Choosing a beatmap";
|
||||
}
|
||||
|
||||
public class UserActivityMultiplayerGame : UserActivity
|
||||
{
|
||||
public override string Status => "Multiplaying";
|
||||
}
|
||||
|
||||
public class UserActivityEditing : UserActivity
|
||||
{
|
||||
public UserActivityEditing(BeatmapInfo info)
|
||||
public class UserActivityModding : UserActivity
|
||||
{
|
||||
Beatmap = info;
|
||||
public override string Status => "Modding a map";
|
||||
public override Color4 GetAppropriateColour(OsuColour colours) => colours.PurpleDark;
|
||||
}
|
||||
|
||||
public override string Status => @"Editing a beatmap";
|
||||
|
||||
public BeatmapInfo Beatmap { get; }
|
||||
}
|
||||
|
||||
public class UserActivitySoloGame : UserActivity
|
||||
{
|
||||
public UserActivitySoloGame(BeatmapInfo info, Rulesets.RulesetInfo ruleset)
|
||||
public class UserActivityChoosingBeatmap : UserActivity
|
||||
{
|
||||
Beatmap = info;
|
||||
Ruleset = ruleset;
|
||||
public override string Status => "Choosing a beatmap";
|
||||
}
|
||||
|
||||
public override string Status => @"Solo Game";
|
||||
public class UserActivityMultiplayerGame : UserActivity
|
||||
{
|
||||
public override string Status => "Multiplaying";
|
||||
}
|
||||
|
||||
public BeatmapInfo Beatmap { get; }
|
||||
public class UserActivityEditing : UserActivity
|
||||
{
|
||||
public UserActivityEditing(BeatmapInfo info)
|
||||
{
|
||||
Beatmap = info;
|
||||
}
|
||||
|
||||
public Rulesets.RulesetInfo Ruleset { get; }
|
||||
public override string Status => @"Editing a beatmap";
|
||||
|
||||
public BeatmapInfo Beatmap { get; }
|
||||
}
|
||||
|
||||
public class UserActivitySoloGame : UserActivity
|
||||
{
|
||||
public UserActivitySoloGame(BeatmapInfo info, Rulesets.RulesetInfo ruleset)
|
||||
{
|
||||
Beatmap = info;
|
||||
Ruleset = ruleset;
|
||||
}
|
||||
|
||||
public override string Status => @"Solo Game";
|
||||
|
||||
public BeatmapInfo Beatmap { get; }
|
||||
|
||||
public Rulesets.RulesetInfo Ruleset { get; }
|
||||
}
|
||||
|
||||
public class UserActivitySpectating : UserActivity
|
||||
{
|
||||
public override string Status => @"Spectating a game";
|
||||
}
|
||||
|
||||
public class UserActivityInLobby : UserActivity
|
||||
{
|
||||
public override string Status => @"in Multiplayer Lobby";
|
||||
}
|
||||
}
|
||||
|
||||
public class UserActivitySpectating : UserActivity
|
||||
{
|
||||
public override string Status => @"Spectating a game";
|
||||
}
|
||||
|
||||
public class UserActivityInLobby : UserActivity
|
||||
{
|
||||
public override string Status => @"in Multiplayer Lobby";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user