1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-13 20:33:35 +08:00

Change last year placing from integer to string

This commit is contained in:
ILW8
2025-12-30 00:55:22 +00:00
Unverified
parent 3b9b030aad
commit 6e41332ea3
4 changed files with 4 additions and 15 deletions
@@ -66,7 +66,7 @@ namespace osu.Game.Tournament.Tests
Acronym = { Value = "JPN" },
FlagName = { Value = "JP" },
FullName = { Value = "Japan" },
LastYearPlacing = { Value = 10 },
LastYearPlacing = { Value = "#10" },
Seed = { Value = "#12" },
SeedingResults =
{
+1 -5
View File
@@ -49,11 +49,7 @@ namespace osu.Game.Tournament.Models
public Bindable<string> Seed = new Bindable<string>(string.Empty);
public Bindable<int> LastYearPlacing = new BindableInt
{
MinValue = 0,
MaxValue = 256
};
public Bindable<string> LastYearPlacing = new Bindable<string>("N/A");
[JsonProperty]
public BindableList<TournamentUser> Players { get; } = new BindableList<TournamentUser>();
@@ -10,9 +10,7 @@ using osu.Framework.Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Localisation;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays;
using osu.Game.Overlays.Settings;
using osu.Game.Tournament.Models;
@@ -132,7 +130,7 @@ namespace osu.Game.Tournament.Screens.Editors
Width = 0.2f,
Current = Model.Seed
},
new SettingsSlider<int, LastYearPlacementSlider>
new SettingsTextBox
{
LabelText = "Last Year Placement",
Width = 0.33f,
@@ -200,11 +198,6 @@ namespace osu.Game.Tournament.Screens.Editors
}, true);
}
private partial class LastYearPlacementSlider : RoundedSliderBar<int>
{
public override LocalisableString TooltipText => Current.Value == 0 ? "N/A" : base.TooltipText;
}
public partial class PlayerEditor : CompositeDrawable
{
private readonly TournamentTeam team;
@@ -274,7 +274,7 @@ namespace osu.Game.Tournament.Screens.TeamIntro
new TeamDisplay(team) { Margin = new MarginPadding { Bottom = 30 } },
new RowDisplay("Average Rank:", $"#{team.AverageRank:#,0}"),
new RowDisplay("Seed:", team.Seed.Value),
new RowDisplay("Last year's placing:", team.LastYearPlacing.Value > 0 ? $"#{team.LastYearPlacing:#,0}" : "N/A"),
new RowDisplay("Last year's placing:", team.LastYearPlacing.Value),
new Container { Margin = new MarginPadding { Bottom = 30 } },
}
},