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

Make BeatmapGroup.Hidden more intelligent

This commit is contained in:
Drew DeVault 2017-01-30 09:47:04 -05:00
parent 0a81fdbd10
commit 42a2285ef3
2 changed files with 12 additions and 5 deletions

View File

@ -33,7 +33,18 @@ namespace osu.Game.Beatmaps.Drawables
public BeatmapSetInfo BeatmapSet;
public bool Hidden;
private bool hidden;
public bool Hidden
{
get { return hidden; }
set
{
hidden = value;
Header.Alpha = hidden ? 0 : 1;
if (hidden)
State = BeatmapGroupState.Collapsed;
}
}
public BeatmapGroupState State
{

View File

@ -213,7 +213,6 @@ namespace osu.Game.Screens.Select
{
changed = changed && !beatmapGroup.Hidden;
beatmapGroup.Hidden = false;
beatmapGroup.Header.Alpha = 1;
if (newSelection == null || beatmapGroup.BeatmapSet.OnlineBeatmapSetID == Beatmap.BeatmapSetInfo.OnlineBeatmapSetID)
newSelection = beatmapGroup;
}
@ -221,9 +220,6 @@ namespace osu.Game.Screens.Select
{
changed = changed && beatmapGroup.Hidden;
beatmapGroup.Hidden = true;
beatmapGroup.Header.Alpha = 0;
beatmapGroup.Header.Masking = false;
beatmapGroup.State = BeatmapGroupState.Collapsed;
}
}
if (newSelection != null)