From 2cf863636632887cc7c6029b81dd45b3cad6b10a Mon Sep 17 00:00:00 2001 From: cdwcgt Date: Sun, 2 Apr 2023 22:25:58 +0900 Subject: [PATCH 01/11] show guest diff author in `BeatmapPicker` --- .../Online/TestSceneBeatmapSetOverlay.cs | 73 ++++++++++++++++++- osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs | 30 +++++++- 2 files changed, 101 insertions(+), 2 deletions(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs b/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs index 5d13421195..3090ff6c49 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs @@ -14,6 +14,7 @@ using System.Collections.Generic; using System.Linq; using osu.Framework.Testing; using osu.Game.Beatmaps.Drawables; +using osu.Game.Graphics.Containers; using osu.Game.Online.API; using osu.Game.Online.API.Requests; using osu.Game.Online.API.Requests.Responses; @@ -26,7 +27,7 @@ using APIUser = osu.Game.Online.API.Requests.Responses.APIUser; namespace osu.Game.Tests.Visual.Online { - public partial class TestSceneBeatmapSetOverlay : OsuTestScene + public partial class TestSceneBeatmapSetOverlay : OsuManualInputManagerTestScene { private readonly TestBeatmapSetOverlay overlay; @@ -281,6 +282,22 @@ namespace osu.Game.Tests.Visual.Online AddAssert(@"type is correct", () => type == lookupType.ToString()); } + [Test] + public void TestBeatmapSetWithGuestDIff() + { + AddStep("show map", () => overlay.ShowBeatmapSet(createBeatmapSetWithGuestDiff())); + AddStep("Move mouse to host diff", () => + { + InputManager.MoveMouseTo(overlay.ChildrenOfType().ElementAt(0)); + }); + AddAssert("Guset mapper information not show", () => !overlay.ChildrenOfType().Single().ChildrenOfType().Any()); + AddStep("move mouse to guest diff", () => + { + InputManager.MoveMouseTo(overlay.ChildrenOfType().ElementAt(1)); + }); + AddAssert("Guset mapper information show", () => overlay.ChildrenOfType().Single().ChildrenOfType().Any()); + } + private APIBeatmapSet createManyDifficultiesBeatmapSet() { var set = getBeatmapSet(); @@ -320,6 +337,60 @@ namespace osu.Game.Tests.Visual.Online return beatmapSet; } + private APIBeatmapSet createBeatmapSetWithGuestDiff() + { + var set = getBeatmapSet(); + + var beatmaps = new List(); + + var guestUser = new APIUser + { + Username = @"BanchoBot", + Id = 3, + }; + + set.RelatedUsers = new[] + { + set.Author, guestUser + }; + + beatmaps.Add(new APIBeatmap + { + OnlineID = 1145, + DifficultyName = "Host Diff", + RulesetID = Ruleset.Value.OnlineID, + StarRating = 1.4, + OverallDifficulty = 3.5f, + AuthorID = set.AuthorID, + FailTimes = new APIFailTimes + { + Fails = Enumerable.Range(1, 100).Select(j => j % 12 - 6).ToArray(), + Retries = Enumerable.Range(-2, 100).Select(j => j % 12 - 6).ToArray(), + }, + Status = BeatmapOnlineStatus.Graveyard + }); + + beatmaps.Add(new APIBeatmap + { + OnlineID = 1919, + DifficultyName = "Guest Diff", + RulesetID = Ruleset.Value.OnlineID, + StarRating = 8.1, + OverallDifficulty = 3.5f, + AuthorID = 3, + FailTimes = new APIFailTimes + { + Fails = Enumerable.Range(1, 100).Select(j => j % 12 - 6).ToArray(), + Retries = Enumerable.Range(-2, 100).Select(j => j % 12 - 6).ToArray(), + }, + Status = BeatmapOnlineStatus.Graveyard + }); + + set.Beatmaps = beatmaps.ToArray(); + + return set; + } + private void downloadAssert(bool shown) { AddAssert($"is download button {(shown ? "shown" : "hidden")}", () => overlay.Header.HeaderContent.DownloadButtonsVisible == shown); diff --git a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs index 585e0dd1a2..7dc3fc665f 100644 --- a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs +++ b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs @@ -31,6 +31,7 @@ namespace osu.Game.Overlays.BeatmapSet private const float tile_spacing = 2; private readonly OsuSpriteText version, starRating, starRatingText; + public readonly FillFlowContainer GuestMapperContainer; private readonly FillFlowContainer starRatingContainer; private readonly Statistic plays, favourites; @@ -88,6 +89,12 @@ namespace osu.Game.Overlays.BeatmapSet Origin = Anchor.BottomLeft, Font = OsuFont.GetFont(size: 17, weight: FontWeight.Bold) }, + GuestMapperContainer = new FillFlowContainer + { + AutoSizeAxes = Axes.Both, + Anchor = Anchor.BottomLeft, + Origin = Anchor.BottomLeft, + }, starRatingContainer = new FillFlowContainer { Anchor = Anchor.BottomLeft, @@ -198,11 +205,32 @@ namespace osu.Game.Overlays.BeatmapSet updateDifficultyButtons(); } - private void showBeatmap(IBeatmapInfo? beatmapInfo) + private void showBeatmap(APIBeatmap? beatmapInfo) { + GuestMapperContainer.Clear(); + + if (beatmapInfo != null && beatmapSet?.Author.OnlineID != beatmapInfo.AuthorID) + { + if (BeatmapSet?.RelatedUsers?.Single(u => u.OnlineID == beatmapInfo.AuthorID) is APIUser user) + GuestMapperContainer.Child = getGueatMapper(user); + } + version.Text = beatmapInfo?.DifficultyName ?? string.Empty; } + private Drawable getGueatMapper(APIUser user) + { + return new LinkFlowContainer(s => + { + s.Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 15); + }).With(d => + { + d.AutoSizeAxes = Axes.Both; + d.AddText("mapped by "); + d.AddUserLink(user); + }); + } + private void updateDifficultyButtons() { Difficulties.Children.ToList().ForEach(diff => diff.State = diff.Beatmap == Beatmap.Value ? DifficultySelectorState.Selected : DifficultySelectorState.NotSelected); From d949ef3ca4cf0891f6dff2bc02b9a38c9ee9687c Mon Sep 17 00:00:00 2001 From: cdwcgt Date: Sun, 2 Apr 2023 22:53:15 +0900 Subject: [PATCH 02/11] make `guestMapperContainer` private tests don't use it --- osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs index 7dc3fc665f..61bfd97f3c 100644 --- a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs +++ b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs @@ -31,7 +31,7 @@ namespace osu.Game.Overlays.BeatmapSet private const float tile_spacing = 2; private readonly OsuSpriteText version, starRating, starRatingText; - public readonly FillFlowContainer GuestMapperContainer; + private readonly FillFlowContainer guestMapperContainer; private readonly FillFlowContainer starRatingContainer; private readonly Statistic plays, favourites; @@ -89,7 +89,7 @@ namespace osu.Game.Overlays.BeatmapSet Origin = Anchor.BottomLeft, Font = OsuFont.GetFont(size: 17, weight: FontWeight.Bold) }, - GuestMapperContainer = new FillFlowContainer + guestMapperContainer = new FillFlowContainer { AutoSizeAxes = Axes.Both, Anchor = Anchor.BottomLeft, @@ -207,12 +207,12 @@ namespace osu.Game.Overlays.BeatmapSet private void showBeatmap(APIBeatmap? beatmapInfo) { - GuestMapperContainer.Clear(); + guestMapperContainer.Clear(); if (beatmapInfo != null && beatmapSet?.Author.OnlineID != beatmapInfo.AuthorID) { if (BeatmapSet?.RelatedUsers?.Single(u => u.OnlineID == beatmapInfo.AuthorID) is APIUser user) - GuestMapperContainer.Child = getGueatMapper(user); + guestMapperContainer.Child = getGueatMapper(user); } version.Text = beatmapInfo?.DifficultyName ?? string.Empty; From 51240ed46b0fbec450b74c7513cf3737a997cad9 Mon Sep 17 00:00:00 2001 From: cdwcgt Date: Mon, 3 Apr 2023 19:51:22 +0900 Subject: [PATCH 03/11] typo --- osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs index 61bfd97f3c..59be9414fd 100644 --- a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs +++ b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs @@ -212,13 +212,13 @@ namespace osu.Game.Overlays.BeatmapSet if (beatmapInfo != null && beatmapSet?.Author.OnlineID != beatmapInfo.AuthorID) { if (BeatmapSet?.RelatedUsers?.Single(u => u.OnlineID == beatmapInfo.AuthorID) is APIUser user) - guestMapperContainer.Child = getGueatMapper(user); + guestMapperContainer.Child = getGuestMapper(user); } version.Text = beatmapInfo?.DifficultyName ?? string.Empty; } - private Drawable getGueatMapper(APIUser user) + private Drawable getGuestMapper(APIUser user) { return new LinkFlowContainer(s => { From 41c01d3929279865a1e542c7aa556bc3dad1d44d Mon Sep 17 00:00:00 2001 From: cdwcgt Date: Mon, 3 Apr 2023 20:07:21 +0900 Subject: [PATCH 04/11] nullable condition --- osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs index 59be9414fd..67348959a6 100644 --- a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs +++ b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs @@ -211,21 +211,18 @@ namespace osu.Game.Overlays.BeatmapSet if (beatmapInfo != null && beatmapSet?.Author.OnlineID != beatmapInfo.AuthorID) { - if (BeatmapSet?.RelatedUsers?.Single(u => u.OnlineID == beatmapInfo.AuthorID) is APIUser user) guestMapperContainer.Child = getGuestMapper(user); + APIUser? user = BeatmapSet?.RelatedUsers?.Single(u => u.OnlineID == beatmapInfo?.AuthorID); + if (user != null) } version.Text = beatmapInfo?.DifficultyName ?? string.Empty; } - private Drawable getGuestMapper(APIUser user) + private void getGuestMapper(APIUser user) { - return new LinkFlowContainer(s => + guestMapperContainer.With(d => { - s.Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 15); - }).With(d => - { - d.AutoSizeAxes = Axes.Both; d.AddText("mapped by "); d.AddUserLink(user); }); From 735b48679e2d4cd025590d84e7bd84a6712b08ab Mon Sep 17 00:00:00 2001 From: cdwcgt Date: Mon, 3 Apr 2023 20:09:49 +0900 Subject: [PATCH 05/11] use `LinkFlowContainer` directly --- .../Visual/Online/TestSceneBeatmapSetOverlay.cs | 5 +++-- osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs | 11 ++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs b/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs index 3090ff6c49..37f7b7623b 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs @@ -15,6 +15,7 @@ using System.Linq; using osu.Framework.Testing; using osu.Game.Beatmaps.Drawables; using osu.Game.Graphics.Containers; +using osu.Game.Graphics.Sprites; using osu.Game.Online.API; using osu.Game.Online.API.Requests; using osu.Game.Online.API.Requests.Responses; @@ -290,12 +291,12 @@ namespace osu.Game.Tests.Visual.Online { InputManager.MoveMouseTo(overlay.ChildrenOfType().ElementAt(0)); }); - AddAssert("Guset mapper information not show", () => !overlay.ChildrenOfType().Single().ChildrenOfType().Any()); + AddAssert("Guset mapper information not show", () => overlay.ChildrenOfType().Single().ChildrenOfType().All(s => s.Text != "BanchoBot")); AddStep("move mouse to guest diff", () => { InputManager.MoveMouseTo(overlay.ChildrenOfType().ElementAt(1)); }); - AddAssert("Guset mapper information show", () => overlay.ChildrenOfType().Single().ChildrenOfType().Any()); + AddAssert("Guset mapper information show", () => overlay.ChildrenOfType().Single().ChildrenOfType().Any(s => s.Text == "BanchoBot")); } private APIBeatmapSet createManyDifficultiesBeatmapSet() diff --git a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs index 67348959a6..3689599a6f 100644 --- a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs +++ b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs @@ -31,7 +31,7 @@ namespace osu.Game.Overlays.BeatmapSet private const float tile_spacing = 2; private readonly OsuSpriteText version, starRating, starRatingText; - private readonly FillFlowContainer guestMapperContainer; + private readonly LinkFlowContainer guestMapperContainer; private readonly FillFlowContainer starRatingContainer; private readonly Statistic plays, favourites; @@ -89,7 +89,8 @@ namespace osu.Game.Overlays.BeatmapSet Origin = Anchor.BottomLeft, Font = OsuFont.GetFont(size: 17, weight: FontWeight.Bold) }, - guestMapperContainer = new FillFlowContainer + guestMapperContainer = new LinkFlowContainer(s => + s.Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 15)) { AutoSizeAxes = Axes.Both, Anchor = Anchor.BottomLeft, @@ -209,11 +210,11 @@ namespace osu.Game.Overlays.BeatmapSet { guestMapperContainer.Clear(); - if (beatmapInfo != null && beatmapSet?.Author.OnlineID != beatmapInfo.AuthorID) + if (beatmapInfo != null && beatmapInfo.AuthorID != beatmapSet?.AuthorID) { - guestMapperContainer.Child = getGuestMapper(user); - APIUser? user = BeatmapSet?.RelatedUsers?.Single(u => u.OnlineID == beatmapInfo?.AuthorID); + APIUser? user = BeatmapSet?.RelatedUsers?.Single(u => u.OnlineID == beatmapInfo.AuthorID); if (user != null) + getGuestMapper(user); } version.Text = beatmapInfo?.DifficultyName ?? string.Empty; From 9dd30e4b4cb87a783c3e3f121b0238716137e252 Mon Sep 17 00:00:00 2001 From: cdwcgt Date: Mon, 3 Apr 2023 20:24:38 +0900 Subject: [PATCH 06/11] condition fix --- osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs index 3689599a6f..63bb122cb6 100644 --- a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs +++ b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs @@ -210,9 +210,9 @@ namespace osu.Game.Overlays.BeatmapSet { guestMapperContainer.Clear(); - if (beatmapInfo != null && beatmapInfo.AuthorID != beatmapSet?.AuthorID) + if (beatmapInfo?.AuthorID != beatmapSet?.AuthorID) { - APIUser? user = BeatmapSet?.RelatedUsers?.Single(u => u.OnlineID == beatmapInfo.AuthorID); + APIUser? user = BeatmapSet?.RelatedUsers?.SingleOrDefault(u => u.OnlineID == beatmapInfo?.AuthorID); if (user != null) getGuestMapper(user); } From 9e0277b2fd85c825cb35e9cf47a1f4313db12656 Mon Sep 17 00:00:00 2001 From: cdwcgt Date: Tue, 4 Apr 2023 00:19:14 +0900 Subject: [PATCH 07/11] useless using --- osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs b/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs index 37f7b7623b..9e46738305 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Linq; using osu.Framework.Testing; using osu.Game.Beatmaps.Drawables; -using osu.Game.Graphics.Containers; using osu.Game.Graphics.Sprites; using osu.Game.Online.API; using osu.Game.Online.API.Requests; From ed208ef12739ff03fa18fefc15036a7594601739 Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Fri, 7 Apr 2023 21:10:37 -0700 Subject: [PATCH 08/11] Fix more typos and adjust font size to match web --- osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs | 6 +++--- osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs b/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs index 9e46738305..4838f42043 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs @@ -286,16 +286,16 @@ namespace osu.Game.Tests.Visual.Online public void TestBeatmapSetWithGuestDIff() { AddStep("show map", () => overlay.ShowBeatmapSet(createBeatmapSetWithGuestDiff())); - AddStep("Move mouse to host diff", () => + AddStep("move mouse to host diff", () => { InputManager.MoveMouseTo(overlay.ChildrenOfType().ElementAt(0)); }); - AddAssert("Guset mapper information not show", () => overlay.ChildrenOfType().Single().ChildrenOfType().All(s => s.Text != "BanchoBot")); + AddAssert("guest mapper information not shown", () => overlay.ChildrenOfType().Single().ChildrenOfType().All(s => s.Text != "BanchoBot")); AddStep("move mouse to guest diff", () => { InputManager.MoveMouseTo(overlay.ChildrenOfType().ElementAt(1)); }); - AddAssert("Guset mapper information show", () => overlay.ChildrenOfType().Single().ChildrenOfType().Any(s => s.Text == "BanchoBot")); + AddAssert("guest mapper information shown", () => overlay.ChildrenOfType().Single().ChildrenOfType().Any(s => s.Text == "BanchoBot")); } private APIBeatmapSet createManyDifficultiesBeatmapSet() diff --git a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs index 63bb122cb6..d527d4cc9a 100644 --- a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs +++ b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs @@ -90,11 +90,12 @@ namespace osu.Game.Overlays.BeatmapSet Font = OsuFont.GetFont(size: 17, weight: FontWeight.Bold) }, guestMapperContainer = new LinkFlowContainer(s => - s.Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 15)) + s.Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 11)) { AutoSizeAxes = Axes.Both, Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, + Margin = new MarginPadding { Bottom = 1 }, }, starRatingContainer = new FillFlowContainer { From a86a968faca0168128a0ddb432e8dfd590e93c17 Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Fri, 7 Apr 2023 21:16:36 -0700 Subject: [PATCH 09/11] Use public `BeatmapSet` to match other usages --- osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs index d527d4cc9a..27e671ded0 100644 --- a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs +++ b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs @@ -211,7 +211,7 @@ namespace osu.Game.Overlays.BeatmapSet { guestMapperContainer.Clear(); - if (beatmapInfo?.AuthorID != beatmapSet?.AuthorID) + if (beatmapInfo?.AuthorID != BeatmapSet?.AuthorID) { APIUser? user = BeatmapSet?.RelatedUsers?.SingleOrDefault(u => u.OnlineID == beatmapInfo?.AuthorID); if (user != null) From 11fd93a2baec751af641692664cbf3387871839d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 10 Apr 2023 15:19:54 +0200 Subject: [PATCH 10/11] Inline disturbing `getGuestMapper()` method Disturbing because name suggests pure method, but it is in fact `void` and also performs side effects by about the most confusing means possible. --- osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs index 27e671ded0..104f861df7 100644 --- a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs +++ b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs @@ -214,22 +214,17 @@ namespace osu.Game.Overlays.BeatmapSet if (beatmapInfo?.AuthorID != BeatmapSet?.AuthorID) { APIUser? user = BeatmapSet?.RelatedUsers?.SingleOrDefault(u => u.OnlineID == beatmapInfo?.AuthorID); + if (user != null) - getGuestMapper(user); + { + guestMapperContainer.AddText("mapped by "); + guestMapperContainer.AddUserLink(user); + } } version.Text = beatmapInfo?.DifficultyName ?? string.Empty; } - private void getGuestMapper(APIUser user) - { - guestMapperContainer.With(d => - { - d.AddText("mapped by "); - d.AddUserLink(user); - }); - } - private void updateDifficultyButtons() { Difficulties.Children.ToList().ForEach(diff => diff.State = diff.Beatmap == Beatmap.Value ? DifficultySelectorState.Selected : DifficultySelectorState.NotSelected); From 6e08105e2c37656801dda1d0583525a549f049e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 10 Apr 2023 15:27:10 +0200 Subject: [PATCH 11/11] Remove usage of "diff" vernacular --- .../Visual/Online/TestSceneBeatmapSetOverlay.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs b/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs index 4838f42043..a27c4ddad2 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs @@ -283,15 +283,15 @@ namespace osu.Game.Tests.Visual.Online } [Test] - public void TestBeatmapSetWithGuestDIff() + public void TestBeatmapSetWithGuestDifficulty() { - AddStep("show map", () => overlay.ShowBeatmapSet(createBeatmapSetWithGuestDiff())); - AddStep("move mouse to host diff", () => + AddStep("show map", () => overlay.ShowBeatmapSet(createBeatmapSetWithGuestDifficulty())); + AddStep("move mouse to host difficulty", () => { InputManager.MoveMouseTo(overlay.ChildrenOfType().ElementAt(0)); }); AddAssert("guest mapper information not shown", () => overlay.ChildrenOfType().Single().ChildrenOfType().All(s => s.Text != "BanchoBot")); - AddStep("move mouse to guest diff", () => + AddStep("move mouse to guest difficulty", () => { InputManager.MoveMouseTo(overlay.ChildrenOfType().ElementAt(1)); }); @@ -337,7 +337,7 @@ namespace osu.Game.Tests.Visual.Online return beatmapSet; } - private APIBeatmapSet createBeatmapSetWithGuestDiff() + private APIBeatmapSet createBeatmapSetWithGuestDifficulty() { var set = getBeatmapSet();