1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-22 00:33:22 +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.beatmapSet = set;
this.beatmap = beatmap; this.beatmap = beatmap;
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
Size = new Vector2(1, 0); Size = new Vector2(1, -1);
Children = new Drawable[] Children = new Drawable[]
{ {
new Box new Box

View File

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

View File

@ -29,10 +29,8 @@ namespace osu.Game.GameModes.Play
private BeatmapInfo selectedBeatmap; private BeatmapInfo selectedBeatmap;
private BeatmapResourceStore beatmapResources; private BeatmapResourceStore beatmapResources;
private TextureStore beatmapTextureResources; private TextureStore beatmapTextureResources;
// TODO: use currently selected track as bg // TODO: use currently selected track as bg
protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Backgrounds/bg4"); protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Backgrounds/bg4");
private ScrollContainer scrollContainer; private ScrollContainer scrollContainer;
private FlowContainer setList; private FlowContainer setList;
@ -75,7 +73,7 @@ namespace osu.Game.GameModes.Play
public PlaySongSelect() public PlaySongSelect()
{ {
const float scrollWidth = 500; const float scrollWidth = 640;
Children = new Drawable[] Children = new Drawable[]
{ {
new Container new Container
@ -115,21 +113,11 @@ namespace osu.Game.GameModes.Play
{ {
Padding = new MarginPadding { Left = 25, Top = 25, Bottom = 25 }, Padding = new MarginPadding { Left = 25, Top = 25, Bottom = 25 },
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Size = new Vector2(1, 0), Size = new Vector2(1, -1),
Direction = FlowDirection.VerticalOnly, Direction = FlowDirection.VerticalOnly,
Spacing = new Vector2(0, 25), 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!"),
} }
}; };
} }