From ade68dd40baba5fa7a54436f57240629d0755ed2 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Sat, 16 May 2026 20:17:07 +0900 Subject: [PATCH] Add experimental banner to ranked play queue screen (#37767) Just to let users know the nature of the system. https://github.com/user-attachments/assets/f0277791-4137-4d65-a27a-6aeb39e8b991 --- .../Matchmaking/Queue/ScreenQueue.cs | 80 ++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/OnlinePlay/Matchmaking/Queue/ScreenQueue.cs b/osu.Game/Screens/OnlinePlay/Matchmaking/Queue/ScreenQueue.cs index 3da4013c61..b93bc9fc7b 100644 --- a/osu.Game/Screens/OnlinePlay/Matchmaking/Queue/ScreenQueue.cs +++ b/osu.Game/Screens/OnlinePlay/Matchmaking/Queue/ScreenQueue.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using System; +using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading; @@ -17,6 +18,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Audio; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; +using osu.Framework.Graphics.Sprites; using osu.Framework.Input.Bindings; using osu.Framework.Input.Events; using osu.Framework.Screens; @@ -29,6 +31,7 @@ using osu.Game.Graphics.UserInterface; using osu.Game.Input.Bindings; using osu.Game.Online.API; using osu.Game.Online.API.Requests.Responses; +using osu.Game.Online.Chat; using osu.Game.Online.Matchmaking; using osu.Game.Online.Matchmaking.Requests; using osu.Game.Online.Multiplayer; @@ -40,6 +43,7 @@ using osu.Game.Screens.Footer; using osu.Game.Screens.OnlinePlay.Matchmaking.Match; using osu.Game.Screens.OnlinePlay.Matchmaking.RankedPlay; using osuTK; +using osuTK.Graphics; namespace osu.Game.Screens.OnlinePlay.Matchmaking.Queue { @@ -112,6 +116,8 @@ namespace osu.Game.Screens.OnlinePlay.Matchmaking.Queue enqueueSample = audio.Samples.Get(@"Multiplayer/Matchmaking/enqueue"); matchFoundSample = audio.Samples.Get(@"Multiplayer/Matchmaking/match-found"); + LinkFlowContainer experimentalText; + InternalChild = new InverseScalingDrawSizePreservingFillContainer { RelativeSizeAxes = Axes.Both, @@ -159,7 +165,39 @@ namespace osu.Game.Screens.OnlinePlay.Matchmaking.Queue ], Content = new[] { - new Drawable[] { new QueueSectionHeader("Queued players") }, + new Drawable[] + { + new FillFlowContainer + { + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Children = new Drawable[] + { + new Container + { + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Masking = true, + CornerRadius = 5, + Children = new Drawable[] + { + new Box + { + RelativeSizeAxes = Axes.Both, + Colour = colours.Yellow + }, + experimentalText = new ExperimentalLinkFlowContainer + { + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Padding = new MarginPadding(10), + } + } + }, + new QueueSectionHeader("Queued players") + } + } + }, new Drawable[] { new Container @@ -315,6 +353,15 @@ namespace osu.Game.Screens.OnlinePlay.Matchmaking.Queue } } }; + + experimentalText.AddIcon(FontAwesome.Solid.Lightbulb); + experimentalText.AddText(@" "); + experimentalText.AddText("This system is under continuous and rapid development.\n", sp => sp.Font = sp.Font.With(weight: FontWeight.SemiBold)); + experimentalText.AddText("Follow the "); + experimentalText.AddLink("changelog", @"https://osu.ppy.sh/community/forums/topics/2202736", sp => sp.Font = sp.Font.With(weight: FontWeight.SemiBold)); + experimentalText.AddText(" and provide any "); + experimentalText.AddLink("feedback", @"https://osu.ppy.sh/community/forums/topics/2198397", sp => sp.Font = sp.Font.With(weight: FontWeight.SemiBold)); + experimentalText.AddText(" on the osu! forums!"); } protected override void LoadComplete() @@ -776,5 +823,36 @@ namespace osu.Game.Screens.OnlinePlay.Matchmaking.Queue { } } + + private partial class ExperimentalLinkFlowContainer : LinkFlowContainer + { + public ExperimentalLinkFlowContainer() + : base(sp => sp.Colour = Color4.Black) + { + } + + protected override DrawableLinkCompiler CreateLinkCompiler(ITextPart textPart) + => new LinkCompiler(textPart); + + private partial class LinkCompiler : DrawableLinkCompiler + { + public LinkCompiler(ITextPart part) + : base(part) + { + } + + public LinkCompiler(IEnumerable parts) + : base(parts) + { + } + + [BackgroundDependencyLoader] + private void load(OsuColour colours) + { + IdleColour = colours.YellowDarker; + HoverColour = Color4.Black; + } + } + } } }