mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Refactor out Hidden
Also fixes a bug I didn't think about before
This commit is contained in:
@ -119,7 +119,7 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
foreach (BeatmapGroup group in groups)
|
||||
{
|
||||
movePanel(group.Header, !group.Hidden, ref currentY);
|
||||
movePanel(group.Header, group.State != BeatmapGroupState.Hidden, ref currentY);
|
||||
|
||||
if (group.State == BeatmapGroupState.Expanded)
|
||||
{
|
||||
@ -134,10 +134,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 && !group.Hidden)
|
||||
if (panel.Alpha == 0 && group.State != BeatmapGroupState.Hidden)
|
||||
panel.MoveToY(headerY);
|
||||
|
||||
movePanel(panel, !group.Hidden, ref currentY);
|
||||
movePanel(panel, group.State != BeatmapGroupState.Hidden, ref currentY);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -208,15 +208,15 @@ namespace osu.Game.Screens.Select
|
||||
|| (set.Metadata.TitleUnicode ?? "").IndexOf(search, StringComparison.InvariantCultureIgnoreCase) != -1;
|
||||
if (match)
|
||||
{
|
||||
changed &= !beatmapGroup.Hidden;
|
||||
beatmapGroup.Hidden = false;
|
||||
changed |= beatmapGroup.State != BeatmapGroupState.Hidden;
|
||||
beatmapGroup.State = BeatmapGroupState.Collapsed;
|
||||
if (newSelection == null || beatmapGroup.BeatmapSet.OnlineBeatmapSetID == Beatmap.BeatmapSetInfo.OnlineBeatmapSetID)
|
||||
newSelection = beatmapGroup;
|
||||
}
|
||||
else
|
||||
{
|
||||
changed &= beatmapGroup.Hidden;
|
||||
beatmapGroup.Hidden = true;
|
||||
changed |= beatmapGroup.State == BeatmapGroupState.Hidden;
|
||||
beatmapGroup.State = BeatmapGroupState.Hidden;
|
||||
}
|
||||
}
|
||||
if (newSelection != null)
|
||||
|
Reference in New Issue
Block a user