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:
parent
0a81fdbd10
commit
42a2285ef3
@ -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
|
||||
{
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user