Change ModDisplay to use ReverseDepthFillFlowContainer

This commit is contained in:
DrabWeb 2017-05-20 02:56:00 -03:00
parent e030573436
commit 0c5fec975d

View File

@ -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();
}
}
}