1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-20 16:12:54 +08:00

Fix assertion failures

This commit is contained in:
Drew DeVault 2016-10-20 11:17:37 -04:00
parent cfa637b763
commit 33fc60716d
3 changed files with 6 additions and 19 deletions

View File

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

View File

@ -76,13 +76,13 @@ namespace osu.Game.GameModes.Play
selectedBeatmap = beatmapSet.Beatmaps[0];
Alpha = collapsedAlpha;
RelativeSizeAxes = Axes.X;
Size = new Vector2(1, 0);
Size = new Vector2(1, -1);
Children = new[]
{
topContainer = new FlowContainer
{
RelativeSizeAxes = Axes.X,
Size = new Vector2(1, 0),
Size = new Vector2(1, -1),
Direction = FlowDirection.VerticalOnly,
Children = new[] { setBox = new BeatmapSetBox(beatmapSet, beatmapStore, resources) }
}
@ -90,7 +90,7 @@ namespace osu.Game.GameModes.Play
difficulties = new FlowContainer // Deliberately not added to children
{
RelativeSizeAxes = Axes.X,
Size = new Vector2(1, 0),
Size = new Vector2(1, -1),
Margin = new MarginPadding { Top = 5 },
Padding = new MarginPadding { Left = 25 },
Spacing = new Vector2(0, 5),
@ -200,7 +200,6 @@ namespace osu.Game.GameModes.Play
{
Anchor = Anchor.Centre,
TextSize = size,
Size = new Vector2(size),
Colour = color,
Icon = icon
}

View File

@ -29,10 +29,8 @@ namespace osu.Game.GameModes.Play
private BeatmapInfo selectedBeatmap;
private BeatmapResourceStore beatmapResources;
private TextureStore beatmapTextureResources;
// TODO: use currently selected track as bg
protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Backgrounds/bg4");
private ScrollContainer scrollContainer;
private FlowContainer setList;
@ -75,7 +73,7 @@ namespace osu.Game.GameModes.Play
public PlaySongSelect()
{
const float scrollWidth = 500;
const float scrollWidth = 640;
Children = new Drawable[]
{
new Container
@ -115,21 +113,11 @@ namespace osu.Game.GameModes.Play
{
Padding = new MarginPadding { Left = 25, Top = 25, Bottom = 25 },
RelativeSizeAxes = Axes.X,
Size = new Vector2(1, 0),
Size = new Vector2(1, -1),
Direction = FlowDirection.VerticalOnly,
Spacing = new Vector2(0, 25),
}
}
},
new Button
{
Text = "Play",
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativePositionAxes = Axes.Both,
Position = Vector2.Zero,
Colour = new Color4(238, 51, 153, 255),
Action = () => Console.WriteLine("Clicked!"),
}
};
}