1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 19:03:08 +08:00

Merge branch 'master' into fix-ubo-not-bound

This commit is contained in:
Dean Herbert 2023-03-26 16:14:11 +09:00
commit d31b37e87e
4 changed files with 11 additions and 10 deletions

View File

@ -126,6 +126,7 @@ namespace osu.Game.Tests.Visual.Online
Id = 13926, Id = 13926,
TournamentId = 35, TournamentId = 35,
ImageLowRes = "https://assets.ppy.sh/tournament-banners/official/owc2022/profile/winner_US.jpg", ImageLowRes = "https://assets.ppy.sh/tournament-banners/official/owc2022/profile/winner_US.jpg",
Image = "https://assets.ppy.sh/tournament-banners/official/owc2022/profile/winner_US@2x.jpg",
}, },
Badges = new[] Badges = new[]
{ {

View File

@ -332,13 +332,6 @@ namespace osu.Game.Tournament
private void saveChanges() private void saveChanges()
{ {
foreach (var r in ladder.Rounds)
r.Matches = ladder.Matches.Where(p => p.Round.Value == r).Select(p => p.ID).ToList();
ladder.Progressions = ladder.Matches.Where(p => p.Progression.Value != null).Select(p => new TournamentProgression(p.ID, p.Progression.Value.ID)).Concat(
ladder.Matches.Where(p => p.LosersProgression.Value != null).Select(p => new TournamentProgression(p.ID, p.LosersProgression.Value.ID, true)))
.ToList();
// Serialise before opening stream for writing, so if there's a failure it will leave the file in the previous state. // Serialise before opening stream for writing, so if there's a failure it will leave the file in the previous state.
string serialisedLadder = GetSerialisedLadder(); string serialisedLadder = GetSerialisedLadder();
@ -349,6 +342,13 @@ namespace osu.Game.Tournament
public string GetSerialisedLadder() public string GetSerialisedLadder()
{ {
foreach (var r in ladder.Rounds)
r.Matches = ladder.Matches.Where(p => p.Round.Value == r).Select(p => p.ID).ToList();
ladder.Progressions = ladder.Matches.Where(p => p.Progression.Value != null).Select(p => new TournamentProgression(p.ID, p.Progression.Value.ID)).Concat(
ladder.Matches.Where(p => p.LosersProgression.Value != null).Select(p => new TournamentProgression(p.ID, p.LosersProgression.Value.ID, true)))
.ToList();
return JsonConvert.SerializeObject(ladder, return JsonConvert.SerializeObject(ladder,
new JsonSerializerSettings new JsonSerializerSettings
{ {

View File

@ -257,6 +257,7 @@ namespace osu.Game.Screens.Select
public FilterControlTextBox() public FilterControlTextBox()
{ {
Height += filter_text_size; Height += filter_text_size;
TextContainer.Height *= (Height - filter_text_size) / Height;
TextContainer.Margin = new MarginPadding { Bottom = filter_text_size }; TextContainer.Margin = new MarginPadding { Bottom = filter_text_size };
} }

View File

@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using System.IO;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace osu.Game.Users namespace osu.Game.Users
@ -17,7 +16,7 @@ namespace osu.Game.Users
[JsonProperty("image")] [JsonProperty("image")]
public string ImageLowRes = null!; public string ImageLowRes = null!;
// TODO: remove when api returns @2x image link: https://github.com/ppy/osu-web/issues/9816 [JsonProperty("image@2x")]
public string Image => $@"{Path.ChangeExtension(ImageLowRes, null)}@2x{Path.GetExtension(ImageLowRes)}"; public string Image = null!;
} }
} }