1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-19 12:23:13 +08:00

Fix up padding on song select

@peppy btw scrolling beyond the ends of the ScrollContainer behaves
weirdly for this container
This commit is contained in:
Drew DeVault 2016-10-13 21:40:44 -04:00
parent 05d803483f
commit 9b88798274

View File

@ -30,7 +30,7 @@ namespace osu.Game.GameModes.Play
private ScrollContainer scrollContainer; private ScrollContainer scrollContainer;
private FlowContainer setList; private FlowContainer setList;
private void selectBeatmapSet(BeatmapSet beatmapSet) private void selectBeatmapSet(BeatmapSet beatmapSet)
{ {
selectedBeatmapSet = beatmapSet; selectedBeatmapSet = beatmapSet;
@ -40,7 +40,7 @@ namespace osu.Game.GameModes.Play
childGroup.Collapsed = childGroup.BeatmapSet != beatmapSet; childGroup.Collapsed = childGroup.BeatmapSet != beatmapSet;
} }
} }
private void addBeatmapSet(BeatmapSet beatmapSet) private void addBeatmapSet(BeatmapSet beatmapSet)
{ {
var group = new BeatmapGroup(beatmapSet); var group = new BeatmapGroup(beatmapSet);
@ -54,7 +54,7 @@ namespace osu.Game.GameModes.Play
foreach (var beatmapSet in sets) foreach (var beatmapSet in sets)
addBeatmapSet(beatmapSet); addBeatmapSet(beatmapSet);
} }
public PlaySongSelect() public PlaySongSelect()
{ {
const float backgroundWidth = 0.6f; const float backgroundWidth = 0.6f;
@ -85,6 +85,7 @@ namespace osu.Game.GameModes.Play
{ {
setList = new FlowContainer setList = new FlowContainer
{ {
Padding = new MarginPadding { Top = 25, Bottom = 25 },
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Size = new Vector2(1, 0), Size = new Vector2(1, 0),
Direction = FlowDirection.VerticalOnly, Direction = FlowDirection.VerticalOnly,
@ -107,7 +108,7 @@ namespace osu.Game.GameModes.Play
// Temporary: // Temporary:
scrollContainer.Padding = new MarginPadding { Top = osu.Toolbar.Height }; scrollContainer.Padding = new MarginPadding { Top = osu.Toolbar.Height };
} }
beatmaps = (game as OsuGameBase).Beatmaps; beatmaps = (game as OsuGameBase).Beatmaps;
beatmaps.BeatmapSetAdded += bset => Scheduler.Add(() => addBeatmapSet(bset)); beatmaps.BeatmapSetAdded += bset => Scheduler.Add(() => addBeatmapSet(bset));
addBeatmapSets(); addBeatmapSets();
@ -126,7 +127,7 @@ namespace osu.Game.GameModes.Play
private void PlayMode_ValueChanged(object sender, EventArgs e) private void PlayMode_ValueChanged(object sender, EventArgs e)
{ {
} }
class BackgroundBox : Box class BackgroundBox : Box
{ {
private float wedgeWidth; private float wedgeWidth;
@ -146,7 +147,7 @@ namespace osu.Game.GameModes.Play
return q; return q;
} }
} }
} }
} }
} }