From e5b64bfa39df31f0db308655c943272e6c7b9348 Mon Sep 17 00:00:00 2001 From: Lucas A Date: Fri, 7 Jun 2019 18:51:43 +0200 Subject: [PATCH 01/10] Highlight major changes in changelog overlay --- osu.Game/Overlays/Changelog/ChangelogBuild.cs | 51 ++++++++++++++++--- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/osu.Game/Overlays/Changelog/ChangelogBuild.cs b/osu.Game/Overlays/Changelog/ChangelogBuild.cs index 57615332da..627eb10426 100644 --- a/osu.Game/Overlays/Changelog/ChangelogBuild.cs +++ b/osu.Game/Overlays/Changelog/ChangelogBuild.cs @@ -69,34 +69,69 @@ namespace osu.Game.Overlays.Changelog Margin = new MarginPadding { Vertical = 5 }, }; + var entryColor = entry.Major != null && (bool)entry.Major ? OsuColour.FromHex("#fd5") : Color4.White; + title.AddIcon(FontAwesome.Solid.Check, t => { t.Font = fontSmall; + t.Colour = entryColor; t.Padding = new MarginPadding { Left = -17, Right = 5 }; }); - title.AddText(entry.Title, t => { t.Font = fontLarge; }); + title.AddText(entry.Title, t => + { + t.Font = fontLarge; + t.Colour = entryColor; + }); if (!string.IsNullOrEmpty(entry.Repository)) { - title.AddText(" (", t => t.Font = fontLarge); + title.AddText(" (", t => + { + t.Font = fontLarge; + t.Colour = entryColor; + }); title.AddLink($"{entry.Repository.Replace("ppy/", "")}#{entry.GithubPullRequestId}", entry.GithubUrl, Online.Chat.LinkAction.External, - creationParameters: t => { t.Font = fontLarge; }); - title.AddText(")", t => t.Font = fontLarge); + creationParameters: t => + { + t.Font = fontLarge; + t.Colour = entryColor; + }); + title.AddText(")", t => + { + t.Font = fontLarge; + t.Colour = entryColor; + }); } - title.AddText(" by ", t => t.Font = fontMedium); + title.AddText(" by ", t => + { + t.Font = fontMedium; + t.Colour = entryColor; + }); if (entry.GithubUser.UserId != null) title.AddUserLink(new User { Username = entry.GithubUser.OsuUsername, Id = entry.GithubUser.UserId.Value - }, t => t.Font = fontMedium); + }, t => + { + t.Font = fontMedium; + t.Colour = entryColor; + }); else if (entry.GithubUser.GithubUrl != null) - title.AddLink(entry.GithubUser.DisplayName, entry.GithubUser.GithubUrl, Online.Chat.LinkAction.External, null, null, t => t.Font = fontMedium); + title.AddLink(entry.GithubUser.DisplayName, entry.GithubUser.GithubUrl, Online.Chat.LinkAction.External, null, null, t => + { + t.Font = fontMedium; + t.Colour = entryColor; + }); else - title.AddText(entry.GithubUser.DisplayName, t => t.Font = fontSmall); + title.AddText(entry.GithubUser.DisplayName, t => + { + t.Font = fontSmall; + t.Colour = entryColor; + }); ChangelogEntries.Add(title); From 342e39776aaa5559401e86d2b6d656f01476acab Mon Sep 17 00:00:00 2001 From: Lucas A Date: Fri, 7 Jun 2019 20:59:56 +0200 Subject: [PATCH 02/10] Move ChangelogEntries populating logic from constructor to BDL load() to use OsuColour palette +apply review suggestions. --- osu.Game/Overlays/Changelog/ChangelogBuild.cs | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/osu.Game/Overlays/Changelog/ChangelogBuild.cs b/osu.Game/Overlays/Changelog/ChangelogBuild.cs index 627eb10426..ae5ba3fa4e 100644 --- a/osu.Game/Overlays/Changelog/ChangelogBuild.cs +++ b/osu.Game/Overlays/Changelog/ChangelogBuild.cs @@ -13,6 +13,7 @@ using System.Text.RegularExpressions; using osu.Game.Graphics.Sprites; using osu.Game.Users; using osuTK.Graphics; +using osu.Framework.Allocation; namespace osu.Game.Overlays.Changelog { @@ -45,8 +46,12 @@ namespace osu.Game.Overlays.Changelog Direction = FillDirection.Vertical, }, }; + } - foreach (var categoryEntries in build.ChangelogEntries.GroupBy(b => b.Category).OrderBy(c => c.Key)) + [BackgroundDependencyLoader] + private void load(OsuColour colours) + { + foreach (var categoryEntries in Build.ChangelogEntries.GroupBy(b => b.Category).OrderBy(c => c.Key)) { ChangelogEntries.Add(new OsuSpriteText { @@ -69,19 +74,19 @@ namespace osu.Game.Overlays.Changelog Margin = new MarginPadding { Vertical = 5 }, }; - var entryColor = entry.Major != null && (bool)entry.Major ? OsuColour.FromHex("#fd5") : Color4.White; + var entryColour = entry.Major != null && (bool)entry.Major ? colours.YellowLight : Color4.White; title.AddIcon(FontAwesome.Solid.Check, t => { t.Font = fontSmall; - t.Colour = entryColor; + t.Colour = entryColour; t.Padding = new MarginPadding { Left = -17, Right = 5 }; }); title.AddText(entry.Title, t => { t.Font = fontLarge; - t.Colour = entryColor; + t.Colour = entryColour; }); if (!string.IsNullOrEmpty(entry.Repository)) @@ -89,25 +94,25 @@ namespace osu.Game.Overlays.Changelog title.AddText(" (", t => { t.Font = fontLarge; - t.Colour = entryColor; + t.Colour = entryColour; }); title.AddLink($"{entry.Repository.Replace("ppy/", "")}#{entry.GithubPullRequestId}", entry.GithubUrl, Online.Chat.LinkAction.External, creationParameters: t => { t.Font = fontLarge; - t.Colour = entryColor; + t.Colour = entryColour; }); title.AddText(")", t => { t.Font = fontLarge; - t.Colour = entryColor; + t.Colour = entryColour; }); } title.AddText(" by ", t => { t.Font = fontMedium; - t.Colour = entryColor; + t.Colour = entryColour; }); if (entry.GithubUser.UserId != null) @@ -118,19 +123,19 @@ namespace osu.Game.Overlays.Changelog }, t => { t.Font = fontMedium; - t.Colour = entryColor; + t.Colour = entryColour; }); else if (entry.GithubUser.GithubUrl != null) title.AddLink(entry.GithubUser.DisplayName, entry.GithubUser.GithubUrl, Online.Chat.LinkAction.External, null, null, t => { t.Font = fontMedium; - t.Colour = entryColor; + t.Colour = entryColour; }); else title.AddText(entry.GithubUser.DisplayName, t => { t.Font = fontSmall; - t.Colour = entryColor; + t.Colour = entryColour; }); ChangelogEntries.Add(title); From e8c73f3127d953a0ca188f0e53b79066e847eb07 Mon Sep 17 00:00:00 2001 From: Lucas A Date: Sat, 8 Jun 2019 09:45:34 +0200 Subject: [PATCH 03/10] Make APIChangelogEntry.Major a non-nullable property --- osu.Game/Online/API/Requests/Responses/APIChangelogEntry.cs | 2 +- osu.Game/Overlays/Changelog/ChangelogBuild.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Online/API/Requests/Responses/APIChangelogEntry.cs b/osu.Game/Online/API/Requests/Responses/APIChangelogEntry.cs index abaff9b7ae..140e228acd 100644 --- a/osu.Game/Online/API/Requests/Responses/APIChangelogEntry.cs +++ b/osu.Game/Online/API/Requests/Responses/APIChangelogEntry.cs @@ -36,7 +36,7 @@ namespace osu.Game.Online.API.Requests.Responses public string MessageHtml { get; set; } [JsonProperty("major")] - public bool? Major { get; set; } + public bool Major { get; set; } [JsonProperty("created_at")] public DateTimeOffset? CreatedAt { get; set; } diff --git a/osu.Game/Overlays/Changelog/ChangelogBuild.cs b/osu.Game/Overlays/Changelog/ChangelogBuild.cs index ae5ba3fa4e..3d145af562 100644 --- a/osu.Game/Overlays/Changelog/ChangelogBuild.cs +++ b/osu.Game/Overlays/Changelog/ChangelogBuild.cs @@ -74,7 +74,7 @@ namespace osu.Game.Overlays.Changelog Margin = new MarginPadding { Vertical = 5 }, }; - var entryColour = entry.Major != null && (bool)entry.Major ? colours.YellowLight : Color4.White; + var entryColour = entry.Major ? colours.YellowLight : Color4.White; title.AddIcon(FontAwesome.Solid.Check, t => { From 383b937a7e44b2eac1f20ba7b1b1a6cfce0bfae2 Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Sat, 8 Jun 2019 19:10:00 +0300 Subject: [PATCH 04/10] Rename F grade to D --- osu.Game/Scoring/ScoreRank.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Scoring/ScoreRank.cs b/osu.Game/Scoring/ScoreRank.cs index a93d015f1b..d3479e21aa 100644 --- a/osu.Game/Scoring/ScoreRank.cs +++ b/osu.Game/Scoring/ScoreRank.cs @@ -7,10 +7,10 @@ namespace osu.Game.Scoring { public enum ScoreRank { - [Description(@"F")] + [Description(@"D")] F, - [Description(@"F")] + [Description(@"D")] D, [Description(@"C")] From dfbc6528031fc340a9a718699db236172aeac207 Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Sat, 8 Jun 2019 19:32:26 +0300 Subject: [PATCH 05/10] Use ScoreRank.D instead of F --- osu.Game/Overlays/BeatmapSet/Scores/TopScoreUserSection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/BeatmapSet/Scores/TopScoreUserSection.cs b/osu.Game/Overlays/BeatmapSet/Scores/TopScoreUserSection.cs index 89da0fc254..cbcf3e6160 100644 --- a/osu.Game/Overlays/BeatmapSet/Scores/TopScoreUserSection.cs +++ b/osu.Game/Overlays/BeatmapSet/Scores/TopScoreUserSection.cs @@ -46,7 +46,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores Text = "#1", Font = OsuFont.GetFont(size: 30, weight: FontWeight.Bold, italics: true) }, - rank = new DrawableRank(ScoreRank.F) + rank = new DrawableRank(ScoreRank.D) { Anchor = Anchor.Centre, Origin = Anchor.Centre, From d3ff2c6dd5bbc9a14653e9fa6a72bb0093f6d519 Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Sat, 8 Jun 2019 19:34:03 +0300 Subject: [PATCH 06/10] Use ScoreRank.D instead of F --- osu.Game.Tests/Visual/SongSelect/TestSceneLeaderboard.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game.Tests/Visual/SongSelect/TestSceneLeaderboard.cs b/osu.Game.Tests/Visual/SongSelect/TestSceneLeaderboard.cs index 3d75470328..9365e2c5b1 100644 --- a/osu.Game.Tests/Visual/SongSelect/TestSceneLeaderboard.cs +++ b/osu.Game.Tests/Visual/SongSelect/TestSceneLeaderboard.cs @@ -188,7 +188,7 @@ namespace osu.Game.Tests.Visual.SongSelect }, new ScoreInfo { - Rank = ScoreRank.F, + Rank = ScoreRank.D, Accuracy = 0.6025, MaxCombo = 244, TotalScore = 1707827, @@ -206,7 +206,7 @@ namespace osu.Game.Tests.Visual.SongSelect }, new ScoreInfo { - Rank = ScoreRank.F, + Rank = ScoreRank.D, Accuracy = 0.5140, MaxCombo = 244, TotalScore = 1707827, @@ -224,7 +224,7 @@ namespace osu.Game.Tests.Visual.SongSelect }, new ScoreInfo { - Rank = ScoreRank.F, + Rank = ScoreRank.D, Accuracy = 0.4222, MaxCombo = 244, TotalScore = 1707827, From fc8644a73e0a8cf37e90ec199f2c4b5ac2b785c5 Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Sat, 8 Jun 2019 19:34:52 +0300 Subject: [PATCH 07/10] Use ScoreRank.D instead of F --- osu.Game.Tests/Visual/Online/TestSceneScoresContainer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneScoresContainer.cs b/osu.Game.Tests/Visual/Online/TestSceneScoresContainer.cs index 6815018be6..2f88a4b01d 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneScoresContainer.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneScoresContainer.cs @@ -157,7 +157,7 @@ namespace osu.Game.Tests.Visual.Online FlagName = @"TH", }, }, - Rank = ScoreRank.F, + Rank = ScoreRank.D, PP = 160, MaxCombo = 1234, TotalScore = 123456, From a2b9dba92cce57e04a956efd1f4baa7906488373 Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Sat, 8 Jun 2019 19:35:29 +0300 Subject: [PATCH 08/10] Remove ScoreRank.F --- osu.Game/Scoring/ScoreRank.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/osu.Game/Scoring/ScoreRank.cs b/osu.Game/Scoring/ScoreRank.cs index d3479e21aa..696d493830 100644 --- a/osu.Game/Scoring/ScoreRank.cs +++ b/osu.Game/Scoring/ScoreRank.cs @@ -7,9 +7,6 @@ namespace osu.Game.Scoring { public enum ScoreRank { - [Description(@"D")] - F, - [Description(@"D")] D, From 807d434be03898334671c6fd382cda252633d6c8 Mon Sep 17 00:00:00 2001 From: Shane Woolcock Date: Sun, 9 Jun 2019 17:52:02 +0930 Subject: [PATCH 09/10] Access WindowModes via IBindableList --- osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs b/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs index 58d2eb1f1e..36c4fb5252 100644 --- a/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs @@ -27,7 +27,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics private Bindable scalingMode; private Bindable sizeFullscreen; - private readonly BindableList windowModes = new BindableList(); + private readonly IBindableList windowModes = new BindableList(); private OsuGameBase game; private SettingsDropdown resolutionDropdown; From a5007b94dbd1b66d97d461c830fb11ef6f784764 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 9 Jun 2019 22:29:00 +0900 Subject: [PATCH 10/10] Update resources --- osu.Game/osu.Game.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 654c62e1d8..eeb1f2bee3 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -14,7 +14,7 @@ - +