1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-20 23:23:30 +08:00

I hope this works

This commit is contained in:
Jorolf 2017-08-09 22:58:06 +02:00
parent acc9b20b0f
commit 15e4e487e2
2 changed files with 17 additions and 15 deletions

View File

@ -16,13 +16,14 @@ using System.Collections.Generic;
namespace osu.Desktop.Tests.Visual
{
public class TestCaseUserRanks : TestCase
internal class TestCaseUserRanks : TestCase
{
public override string Description => "showing your latest achievements";
protected override void LoadComplete()
{
base.LoadComplete();
RanksSection ranks;
Add(new Container

View File

@ -136,19 +136,6 @@ namespace osu.Game.Overlays.Profile.Sections
RelativeSizeAxes = Axes.X,
Direction = FillDirection.Vertical,
},
showMoreText = new OsuHoverContainer
{
Action = ShowMore,
AutoSizeAxes = Axes.Both,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Alpha = 0,
Child = new OsuSpriteText
{
TextSize = 14,
Text = "show more",
}
}
},
};
}
@ -156,7 +143,21 @@ namespace osu.Game.Overlays.Profile.Sections
public override void Clear(bool disposeChildren)
{
base.Clear(disposeChildren);
showMoreText.Show();
if (showMoreText == null)
((FillFlowContainer)InternalChild).Add(showMoreText = new OsuHoverContainer
{
Action = ShowMore,
AutoSizeAxes = Axes.Both,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Child = new OsuSpriteText
{
TextSize = 14,
Text = "show more",
}
});
else
showMoreText.Show();
}
public void ShowMore() => showMoreText.Alpha = Children.Where(d => !d.IsPresent).Where((d, i) => (d.Alpha = i < 5 ? 1 : 0) == 0).Any() ? 1 : 0;