mirror of https://github.com/ppy/osu
Change ModDisplay to use ReverseDepthFillFlowContainer
This commit is contained in:
parent
e030573436
commit
0c5fec975d
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue