mirror of
https://github.com/ppy/osu
synced 2024-12-14 19:06:07 +00:00
Change ModDisplay to use ReverseDepthFillFlowContainer
This commit is contained in:
parent
e030573436
commit
0c5fec975d
@ -12,6 +12,7 @@ using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using OpenTK;
|
||||
using osu.Framework.Input;
|
||||
using osu.Game.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.Screens.Play.HUD
|
||||
{
|
||||
@ -27,7 +28,7 @@ namespace osu.Game.Screens.Play.HUD
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
iconsContainer = new IconFlow
|
||||
iconsContainer = new ReverseDepthFillFlowContainer<ModIcon>
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
@ -93,12 +94,5 @@ namespace osu.Game.Screens.Play.HUD
|
||||
contract();
|
||||
base.OnHoverLost(state);
|
||||
}
|
||||
|
||||
private class IconFlow : FillFlowContainer<ModIcon>
|
||||
{
|
||||
// just reverses the depth of flow contents.
|
||||
protected override IComparer<Drawable> DepthComparer => new ReverseCreationOrderDepthComparer();
|
||||
protected override IEnumerable<ModIcon> FlowingChildren => base.FlowingChildren.Reverse();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user