mirror of
https://github.com/ppy/osu.git
synced 2025-02-22 16:16:07 +08:00
I hope this works
This commit is contained in:
parent
acc9b20b0f
commit
15e4e487e2
@ -16,13 +16,14 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
namespace osu.Desktop.Tests.Visual
|
namespace osu.Desktop.Tests.Visual
|
||||||
{
|
{
|
||||||
public class TestCaseUserRanks : TestCase
|
internal class TestCaseUserRanks : TestCase
|
||||||
{
|
{
|
||||||
public override string Description => "showing your latest achievements";
|
public override string Description => "showing your latest achievements";
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
RanksSection ranks;
|
RanksSection ranks;
|
||||||
|
|
||||||
Add(new Container
|
Add(new Container
|
||||||
|
@ -136,19 +136,6 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Direction = FillDirection.Vertical,
|
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)
|
public override void Clear(bool disposeChildren)
|
||||||
{
|
{
|
||||||
base.Clear(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;
|
public void ShowMore() => showMoreText.Alpha = Children.Where(d => !d.IsPresent).Where((d, i) => (d.Alpha = i < 5 ? 1 : 0) == 0).Any() ? 1 : 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user