mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 11:02:57 +08:00
Don't set hidden; make it based on alpha value.
This commit is contained in:
parent
78be1dd3af
commit
12c74b1b0b
@ -35,14 +35,8 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
switch (state)
|
||||
{
|
||||
case BeatmapGroupState.Expanded:
|
||||
//if (!difficulties.Children.All(d => IsLoaded))
|
||||
// Task.WhenAll(difficulties.Children.Select(d => d.Preload(Game))).ContinueWith(t => difficulties.Show());
|
||||
//else
|
||||
foreach (BeatmapPanel panel in BeatmapPanels)
|
||||
{
|
||||
panel.Hidden = false;
|
||||
panel.FadeIn(250);
|
||||
}
|
||||
|
||||
Header.State = PanelSelectedState.Selected;
|
||||
if (SelectedPanel != null)
|
||||
@ -54,11 +48,7 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
SelectedPanel.State = PanelSelectedState.NotSelected;
|
||||
|
||||
foreach (BeatmapPanel panel in BeatmapPanels)
|
||||
{
|
||||
panel.Hidden = true;
|
||||
panel.FadeOut(250);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -76,6 +66,7 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
|
||||
BeatmapPanels = beatmap.BeatmapSetInfo.Beatmaps.Select(b => new BeatmapPanel(b)
|
||||
{
|
||||
Alpha = 0,
|
||||
GainedSelection = panelGainedSelection,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
}).ToList();
|
||||
|
@ -27,7 +27,6 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
public BeatmapSetHeader(WorkingBeatmap beatmap)
|
||||
{
|
||||
this.beatmap = beatmap;
|
||||
Hidden = false;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
|
@ -4,6 +4,7 @@
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Framework.Input;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
@ -14,7 +15,8 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
{
|
||||
public const float MAX_HEIGHT = 80;
|
||||
|
||||
public bool Hidden = true;
|
||||
public bool Hidden => Alpha == 0 && Transforms.Count == 0;
|
||||
|
||||
private Container nestedContainer;
|
||||
|
||||
protected override Container<Drawable> Content => nestedContainer;
|
||||
|
Loading…
Reference in New Issue
Block a user