public SeedingEditorScreen(TournamentTeam team, TournamentScreen parentScreen) : base(parentScreen) { this.team = team; }
protected TournamentEditorScreen(TournamentScreen parentScreen = null) { this.parentScreen = parentScreen; }
public TeamRow(TournamentTeam team, TournamentScreen parent) { Model = team; Masking = true; CornerRadius = 10; PlayerEditor playerEditor = new PlayerEditor(Model) { Width = 0.95f }; InternalChildren = new Drawable[] { new Box { Colour = OsuColour.Gray(0.1f), RelativeSizeAxes = Axes.Both, }, drawableContainer = new Container { Size = new Vector2(100, 50), Margin = new MarginPadding(10), Anchor = Anchor.TopRight, Origin = Anchor.TopRight, }, new FillFlowContainer { Margin = new MarginPadding(5), Spacing = new Vector2(5), Direction = FillDirection.Full, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { new SettingsTextBox { LabelText = "Name", Width = 0.2f, Current = Model.FullName }, new SettingsTextBox { LabelText = "Acronym", Width = 0.2f, Current = Model.Acronym }, new SettingsTextBox { LabelText = "Flag", Width = 0.2f, Current = Model.FlagName }, new SettingsTextBox { LabelText = "Seed", Width = 0.2f, Current = Model.Seed }, new SettingsSlider <int> { LabelText = "Last Year Placement", Width = 0.33f, Current = Model.LastYearPlacing }, new SettingsButton { Width = 0.11f, Margin = new MarginPadding(10), Text = "Add player", Action = () => playerEditor.CreateNew() }, new DangerousSettingsButton { Width = 0.11f, Text = "Delete Team", Margin = new MarginPadding(10), Action = () => { Expire(); ladderInfo.Teams.Remove(Model); }, }, playerEditor, new SettingsButton { Width = 0.2f, Margin = new MarginPadding(10), Text = "Edit seeding results", Action = () => { sceneManager?.SetScreen(new SeedingEditorScreen(team, parent)); } }, } }, }; RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; Model.FlagName.BindValueChanged(updateDrawable, true); }