1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 15:57:24 +08:00

Add setting to configure team seed display

This commit is contained in:
Salman Ahmed 2023-10-28 08:30:33 +03:00
parent 28e331deed
commit e2788a22b1
3 changed files with 16 additions and 3 deletions

View File

@ -42,5 +42,7 @@ namespace osu.Game.Tournament.Models
public Bindable<bool> AutoProgressScreens = new BindableBool(true); public Bindable<bool> AutoProgressScreens = new BindableBool(true);
public Bindable<bool> SplitMapPoolByMods = new BindableBool(true); public Bindable<bool> SplitMapPoolByMods = new BindableBool(true);
public Bindable<bool> DisplayTeamSeeds = new BindableBool();
} }
} }

View File

@ -2,6 +2,7 @@
// 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 osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Tournament.Components; using osu.Game.Tournament.Components;
@ -16,6 +17,8 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
private TeamScoreDisplay teamDisplay2 = null!; private TeamScoreDisplay teamDisplay2 = null!;
private DrawableTournamentHeaderLogo logo = null!; private DrawableTournamentHeaderLogo logo = null!;
public readonly BindableBool DisplaySeeds = new BindableBool();
private bool showScores = true; private bool showScores = true;
public bool ShowScores public bool ShowScores
@ -88,11 +91,13 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
{ {
Anchor = Anchor.TopLeft, Anchor = Anchor.TopLeft,
Origin = Anchor.TopLeft, Origin = Anchor.TopLeft,
DisplaySeed = { BindTarget = DisplaySeeds },
}, },
teamDisplay2 = new TeamScoreDisplay(TeamColour.Blue) teamDisplay2 = new TeamScoreDisplay(TeamColour.Blue)
{ {
Anchor = Anchor.TopRight, Anchor = Anchor.TopRight,
Origin = Anchor.TopRight, Origin = Anchor.TopRight,
DisplaySeed = { BindTarget = DisplaySeeds },
}, },
}; };
} }

View File

@ -36,7 +36,7 @@ namespace osu.Game.Tournament.Screens.Gameplay
private Drawable chroma = null!; private Drawable chroma = null!;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(LadderInfo ladder, MatchIPCInfo ipc) private void load(MatchIPCInfo ipc)
{ {
this.ipc = ipc; this.ipc = ipc;
@ -118,12 +118,18 @@ namespace osu.Game.Tournament.Screens.Gameplay
LabelText = "Players per team", LabelText = "Players per team",
Current = LadderInfo.PlayersPerTeam, Current = LadderInfo.PlayersPerTeam,
KeyboardStep = 1, KeyboardStep = 1,
} },
new SettingsCheckbox
{
LabelText = "Display team seeds",
Current = LadderInfo.DisplayTeamSeeds,
},
} }
} }
}); });
ladder.ChromaKeyWidth.BindValueChanged(width => chroma.Width = width.NewValue, true); LadderInfo.ChromaKeyWidth.BindValueChanged(width => chroma.Width = width.NewValue, true);
LadderInfo.DisplayTeamSeeds.BindValueChanged(v => header.DisplaySeeds.Value = v.NewValue, true);
warmup.BindValueChanged(w => warmup.BindValueChanged(w =>
{ {