Fix width of beatmaps

This commit is contained in:
Drew DeVault
2016-10-13 20:48:36 -04:00
parent 07e44560be
commit 05d803483f
3 changed files with 13 additions and 2 deletions

View File

@ -28,6 +28,8 @@ namespace osu.Game.GameModes.Play
{ {
this.beatmapSet = set; this.beatmapSet = set;
this.beatmap = beatmap; this.beatmap = beatmap;
RelativeSizeAxes = Axes.X;
Size = new Vector2(1, 0);
Children = new Drawable[] Children = new Drawable[]
{ {
new Box new Box

View File

@ -55,16 +55,22 @@ namespace osu.Game.GameModes.Play
{ {
BeatmapSet = beatmapSet; BeatmapSet = beatmapSet;
Alpha = collapsedAlpha; Alpha = collapsedAlpha;
RelativeSizeAxes = Axes.X;
Size = new Vector2(1, 0);
Children = new[] Children = new[]
{ {
topContainer = new FlowContainer topContainer = new FlowContainer
{ {
RelativeSizeAxes = Axes.X,
Size = new Vector2(1, 0),
Direction = FlowDirection.VerticalOnly, Direction = FlowDirection.VerticalOnly,
Children = new[] { new BeatmapSetBox(beatmapSet) } Children = new[] { new BeatmapSetBox(beatmapSet) }
} }
}; };
difficulties = new FlowContainer // Deliberately not added to children difficulties = new FlowContainer // Deliberately not added to children
{ {
RelativeSizeAxes = Axes.X,
Size = new Vector2(1, 0),
Margin = new MarginPadding { Top = 5 }, Margin = new MarginPadding { Top = 5 },
Padding = new MarginPadding { Left = 25 }, Padding = new MarginPadding { Left = 25 },
Spacing = new Vector2(0, 5), Spacing = new Vector2(0, 5),
@ -88,6 +94,8 @@ namespace osu.Game.GameModes.Play
public BeatmapSetBox(BeatmapSet beatmapSet) public BeatmapSetBox(BeatmapSet beatmapSet)
{ {
this.beatmapSet = beatmapSet; this.beatmapSet = beatmapSet;
RelativeSizeAxes = Axes.X;
Size = new Vector2(1, 0);
Children = new Drawable[] Children = new Drawable[]
{ {
new Box new Box

View File

@ -81,12 +81,13 @@ namespace osu.Game.GameModes.Play
RelativePositionAxes = Axes.Both, RelativePositionAxes = Axes.Both,
Size = new Vector2(0.5f, 1), Size = new Vector2(0.5f, 1),
Position = new Vector2(0.5f, 0), Position = new Vector2(0.5f, 0),
Children = new[] Children = new Drawable[]
{ {
setList = new FlowContainer setList = new FlowContainer
{ {
RelativeSizeAxes = Axes.X,
Size = new Vector2(1, 0),
Direction = FlowDirection.VerticalOnly, Direction = FlowDirection.VerticalOnly,
Padding = new MarginPadding(25),
Spacing = new Vector2(0, 25), Spacing = new Vector2(0, 25),
} }
} }