mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:12:54 +08:00
Don't rely on masking for bar display
This commit is contained in:
parent
923041c3f9
commit
f8187fa301
@ -33,7 +33,6 @@ namespace osu.Game.Overlays.BeatmapSet
|
|||||||
: base(value)
|
: base(value)
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
Masking = true;
|
|
||||||
|
|
||||||
FillFlowContainer nameContainer;
|
FillFlowContainer nameContainer;
|
||||||
|
|
||||||
@ -87,7 +86,6 @@ namespace osu.Game.Overlays.BeatmapSet
|
|||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.BottomCentre,
|
||||||
Origin = Anchor.BottomCentre,
|
Origin = Anchor.BottomCentre,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = 4f,
|
|
||||||
},
|
},
|
||||||
new HoverClickSounds(),
|
new HoverClickSounds(),
|
||||||
};
|
};
|
||||||
@ -95,9 +93,10 @@ namespace osu.Game.Overlays.BeatmapSet
|
|||||||
BeatmapSet.BindValueChanged(setInfo =>
|
BeatmapSet.BindValueChanged(setInfo =>
|
||||||
{
|
{
|
||||||
var beatmapsCount = setInfo.NewValue?.Beatmaps.Count(b => b.Ruleset.Equals(Value)) ?? 0;
|
var beatmapsCount = setInfo.NewValue?.Beatmaps.Count(b => b.Ruleset.Equals(Value)) ?? 0;
|
||||||
count.Text = beatmapsCount.ToString();
|
|
||||||
|
|
||||||
|
count.Text = beatmapsCount.ToString();
|
||||||
count.Alpha = beatmapsCount > 0 ? 1f : 0f;
|
count.Alpha = beatmapsCount > 0 ? 1f : 0f;
|
||||||
|
|
||||||
Enabled.Value = beatmapsCount > 0;
|
Enabled.Value = beatmapsCount > 0;
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
@ -120,9 +119,10 @@ namespace osu.Game.Overlays.BeatmapSet
|
|||||||
private void updateState()
|
private void updateState()
|
||||||
{
|
{
|
||||||
var isHoveredOrActive = IsHovered || Active.Value;
|
var isHoveredOrActive = IsHovered || Active.Value;
|
||||||
name.Colour = isHoveredOrActive ? colour.GrayE : colour.GrayC;
|
|
||||||
bar.MoveToY(isHoveredOrActive ? 0f : bar.Height, 120);
|
|
||||||
|
|
||||||
|
bar.ResizeHeightTo(isHoveredOrActive ? 4 : 1, 200, Easing.OutQuint);
|
||||||
|
|
||||||
|
name.Colour = isHoveredOrActive ? colour.GrayE : colour.GrayC;
|
||||||
name.Font = name.Font.With(weight: Active.Value ? FontWeight.Bold : FontWeight.Regular);
|
name.Font = name.Font.With(weight: Active.Value ? FontWeight.Bold : FontWeight.Regular);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user