Add ability to reset bracket

This commit is contained in:
Dean Herbert 2019-02-06 18:36:15 +09:00
parent cb23918512
commit 5048f425d4
2 changed files with 14 additions and 0 deletions

View File

@ -110,5 +110,14 @@ public void StartMatch()
Team1Score.Value = 0;
Team2Score.Value = 0;
}
public void Reset()
{
CancelMatchStart();
Team1.Value = null;
Team2.Value = null;
Completed.Value = false;
PicksBans.Clear();
}
}
}

View File

@ -77,6 +77,11 @@ public MenuItem[] ContextMenuItems
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();
})
};
}
}