mirror of
https://github.com/ppy/osu
synced 2025-01-20 04:50:50 +00:00
Remove OnHighlightedChanged function
This commit is contained in:
parent
e22a71c6b8
commit
c7c8527f5f
@ -114,13 +114,12 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
this.FadeColour(hovered.NewValue ? Color4.White : Color4.DimGray, duration, Easing.OutQuint);
|
||||
}, true);
|
||||
}
|
||||
|
||||
protected override void OnHighlightedChanged(ValueChangedEvent<bool> highlighted)
|
||||
{
|
||||
base.OnHighlightedChanged(highlighted);
|
||||
OnSelectionChanged?.Invoke(Mod, highlighted.NewValue);
|
||||
IsActive.TriggerChange();
|
||||
Highlighted.BindValueChanged(highlighted =>
|
||||
{
|
||||
OnSelectionChanged?.Invoke(Mod, highlighted.NewValue);
|
||||
IsActive.TriggerChange();
|
||||
}, true);
|
||||
}
|
||||
|
||||
protected override bool OnClick(ClickEvent e)
|
||||
|
@ -107,19 +107,12 @@ namespace osu.Game.Rulesets.UI
|
||||
modIcon.Colour = colours.Yellow;
|
||||
break;
|
||||
}
|
||||
|
||||
background.Colour = backgroundColour;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
Highlighted.BindValueChanged(OnHighlightedChanged, true);
|
||||
}
|
||||
|
||||
protected virtual void OnHighlightedChanged(ValueChangedEvent<bool> highlighted)
|
||||
{
|
||||
background.Colour = highlighted.NewValue ? highlightedColour : backgroundColour;
|
||||
Highlighted.BindValueChanged(highlighted => background.Colour = highlighted.NewValue ? highlightedColour : backgroundColour, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user