Change ModDisplay to use ReverseDepthFillFlowContainer

This commit is contained in:
DrabWeb 2017-05-20 02:56:00 -03:00
parent e030573436
commit 0c5fec975d
1 changed files with 2 additions and 8 deletions

View File

@ -12,6 +12,7 @@
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 @@ public ModDisplay()
{
Children = new Drawable[]
{
iconsContainer = new IconFlow
iconsContainer = new ReverseDepthFillFlowContainer<ModIcon>
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
@ -93,12 +94,5 @@ protected override void OnHoverLost(InputState state)
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();
}
}
}