mirror of
https://github.com/ppy/osu.git
synced 2025-02-16 16:23:16 +08:00
Further layout improvements to TeamEditorScreen
This commit is contained in:
parent
b712b19539
commit
427045fdaf
@ -11,7 +11,6 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Online.API;
|
|
||||||
using osu.Game.Overlays.Settings;
|
using osu.Game.Overlays.Settings;
|
||||||
using osu.Game.Tournament.Models;
|
using osu.Game.Tournament.Models;
|
||||||
using osu.Game.Tournament.Screens.Drawings.Components;
|
using osu.Game.Tournament.Screens.Drawings.Components;
|
||||||
@ -75,10 +74,7 @@ namespace osu.Game.Tournament.Screens.Editors
|
|||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
|
|
||||||
PlayerEditor playerEditor = new PlayerEditor(Model)
|
PlayerEditor playerEditor = new PlayerEditor(Model);
|
||||||
{
|
|
||||||
Width = 0.95f
|
|
||||||
};
|
|
||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -89,14 +85,15 @@ namespace osu.Game.Tournament.Screens.Editors
|
|||||||
},
|
},
|
||||||
new GroupTeam(team)
|
new GroupTeam(team)
|
||||||
{
|
{
|
||||||
Margin = new MarginPadding(32),
|
Margin = new MarginPadding(16),
|
||||||
|
Scale = new Vector2(2),
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopRight,
|
||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopRight,
|
||||||
},
|
},
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
Margin = new MarginPadding(5),
|
|
||||||
Spacing = new Vector2(5),
|
Spacing = new Vector2(5),
|
||||||
|
Padding = new MarginPadding(10),
|
||||||
Direction = FillDirection.Full,
|
Direction = FillDirection.Full,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
@ -136,29 +133,36 @@ namespace osu.Game.Tournament.Screens.Editors
|
|||||||
{
|
{
|
||||||
Width = 0.2f,
|
Width = 0.2f,
|
||||||
Margin = new MarginPadding(10),
|
Margin = new MarginPadding(10),
|
||||||
|
Text = "Edit seeding results",
|
||||||
|
Action = () =>
|
||||||
|
{
|
||||||
|
sceneManager?.SetScreen(new SeedingEditorScreen(team, parent));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
playerEditor,
|
||||||
|
new SettingsButton
|
||||||
|
{
|
||||||
Text = "Add player",
|
Text = "Add player",
|
||||||
Action = () => playerEditor.CreateNew()
|
Action = () => playerEditor.CreateNew()
|
||||||
},
|
},
|
||||||
|
new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
new DangerousSettingsButton
|
new DangerousSettingsButton
|
||||||
{
|
{
|
||||||
Width = 0.2f,
|
Width = 0.2f,
|
||||||
Text = "Delete Team",
|
Text = "Delete Team",
|
||||||
Margin = new MarginPadding(10),
|
Anchor = Anchor.TopRight,
|
||||||
|
Origin = Anchor.TopRight,
|
||||||
Action = () =>
|
Action = () =>
|
||||||
{
|
{
|
||||||
Expire();
|
Expire();
|
||||||
ladderInfo.Teams.Remove(Model);
|
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));
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -183,6 +187,8 @@ namespace osu.Game.Tournament.Screens.Editors
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
|
Padding = new MarginPadding(5),
|
||||||
|
Spacing = new Vector2(5),
|
||||||
ChildrenEnumerable = team.Players.Select(p => new PlayerRow(team, p))
|
ChildrenEnumerable = team.Players.Select(p => new PlayerRow(team, p))
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -198,9 +204,6 @@ namespace osu.Game.Tournament.Screens.Editors
|
|||||||
{
|
{
|
||||||
private readonly TournamentUser user;
|
private readonly TournamentUser user;
|
||||||
|
|
||||||
[Resolved]
|
|
||||||
protected IAPIProvider API { get; private set; } = null!;
|
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private TournamentGameBase game { get; set; } = null!;
|
private TournamentGameBase game { get; set; } = null!;
|
||||||
|
|
||||||
@ -212,8 +215,6 @@ namespace osu.Game.Tournament.Screens.Editors
|
|||||||
{
|
{
|
||||||
this.user = user;
|
this.user = user;
|
||||||
|
|
||||||
Margin = new MarginPadding(10);
|
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
|
|
||||||
@ -246,7 +247,7 @@ namespace osu.Game.Tournament.Screens.Editors
|
|||||||
},
|
},
|
||||||
userPanelContainer = new Container
|
userPanelContainer = new Container
|
||||||
{
|
{
|
||||||
Width = 500,
|
Width = 400,
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -292,8 +293,9 @@ namespace osu.Game.Tournament.Screens.Editors
|
|||||||
{
|
{
|
||||||
userPanelContainer.Child = new UserListPanel(user.ToAPIUser())
|
userPanelContainer.Child = new UserListPanel(user.ToAPIUser())
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.CentreLeft,
|
||||||
|
Scale = new Vector2(1.7f),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user