1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 00:03:21 +08:00

Change the way we set our initial y position on first display.

This commit is contained in:
Dean Herbert 2016-11-25 12:50:18 +09:00
parent f540bf3765
commit 4184dd2329

View File

@ -74,6 +74,7 @@ namespace osu.Game.Screens.Select
if (group.State == BeatmapGroupState.Expanded)
{
group.Header.MoveToX(-100, 500, EasingTypes.OutExpo);
var headerY = group.Header.Position.Y;
foreach (BeatmapPanel panel in group.BeatmapPanels)
{
@ -82,6 +83,10 @@ namespace osu.Game.Screens.Select
panel.MoveToX(-50, 500, EasingTypes.OutExpo);
//on first display we want to begin hidden under our group's header.
if (panel.Alpha == 0)
panel.MoveToY(headerY);
movePanel(panel, true, ref currentY);
}
}
@ -119,11 +124,7 @@ namespace osu.Game.Screens.Select
public void SelectGroup(BeatmapGroup group, BeatmapPanel panel)
{
if (SelectedGroup != null && SelectedGroup != group)
{
SelectedGroup.State = BeatmapGroupState.Collapsed;
foreach (BeatmapPanel p in group.BeatmapPanels)
p.MoveToY(group.Header.Position.Y);
}
SelectedGroup = group;
panel.State = PanelSelectedState.Selected;