1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

Add basic "currently watching" text to player to signify that spectator is active

This commit is contained in:
Dean Herbert 2020-10-28 19:39:38 +09:00
parent 93fd913876
commit dd2f44f393

View File

@ -3,8 +3,11 @@
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Screens;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Online.Spectator;
using osu.Game.Scoring;
using osu.Game.Screens.Ranking;
@ -35,6 +38,15 @@ namespace osu.Game.Screens.Play
private void load()
{
spectatorStreaming.OnUserBeganPlaying += userBeganPlaying;
AddInternal(new OsuSpriteText
{
Text = $"Watching {score.ScoreInfo.User.Username} playing live!",
Font = OsuFont.Default.With(size: 30),
Y = 100,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
});
}
protected override void PrepareReplay()