mirror of
https://github.com/ppy/osu.git
synced 2025-02-20 05:03:20 +08:00
Add ability to reset bracket
This commit is contained in:
parent
cb23918512
commit
5048f425d4
@ -110,5 +110,14 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
||||
Team1Score.Value = 0;
|
||||
Team2Score.Value = 0;
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
CancelMatchStart();
|
||||
Team1.Value = null;
|
||||
Team2.Value = null;
|
||||
Completed.Value = false;
|
||||
PicksBans.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -77,6 +77,11 @@ namespace osu.Game.Tournament.Screens.Ladder
|
||||
var pos = PairingsContainer.ToLocalSpace(GetContainingInputManager().CurrentState.Mouse.Position);
|
||||
AddPairing(new MatchPairing { Position = { Value = new Point((int)pos.X, (int)pos.Y) } });
|
||||
}),
|
||||
new OsuMenuItem("Reset teams", MenuItemType.Destructive, () =>
|
||||
{
|
||||
foreach (var p in PairingsContainer)
|
||||
p.Pairing.Reset();
|
||||
})
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user