mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 09:13:21 +08:00
Update dependency
This commit is contained in:
parent
2719be7769
commit
99ec84ed38
@ -54,13 +54,9 @@ namespace osu.Game.Overlays.BeatmapSet
|
|||||||
|
|
||||||
modsContainer.Add(new ModButton(new NoMod()));
|
modsContainer.Add(new ModButton(new NoMod()));
|
||||||
|
|
||||||
ruleset.NewValue.CreateInstance().GetAllMods().ForEach(mod =>
|
modsContainer.AddRange(ruleset.NewValue.CreateInstance().GetAllMods().Where(m => m.Ranked).Select(m => new ModButton(m)));
|
||||||
{
|
|
||||||
if (mod.Ranked)
|
|
||||||
modsContainer.Add(new ModButton(mod));
|
|
||||||
});
|
|
||||||
|
|
||||||
modsContainer.ForEach(button => button.OnSelectionChanged += selectionChanged);
|
modsContainer.ForEach(button => button.OnSelectionChanged = selectionChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectionChanged(Mod mod, bool selected)
|
private void selectionChanged(Mod mod, bool selected)
|
||||||
@ -77,11 +73,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
|||||||
protected override bool OnHover(HoverEvent e)
|
protected override bool OnHover(HoverEvent e)
|
||||||
{
|
{
|
||||||
if (!SelectedMods.Any())
|
if (!SelectedMods.Any())
|
||||||
modsContainer.ForEach(button =>
|
modsContainer.Children.Where(button => !button.IsHovered).ForEach(button => button.Highlighted.Value = false);
|
||||||
{
|
|
||||||
if (!button.IsHovered)
|
|
||||||
button.Highlighted.Value = false;
|
|
||||||
});
|
|
||||||
|
|
||||||
return base.OnHover(e);
|
return base.OnHover(e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user