mirror of
https://github.com/osukey/osukey.git
synced 2025-06-08 21:07:59 +09:00
Merge remote-tracking branch 'upstream/master' into rankings-scope-selector
This commit is contained in:
commit
43d7615734
@ -215,6 +215,7 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
Origin = Anchor.BottomRight,
|
Origin = Anchor.BottomRight,
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal,
|
||||||
|
Spacing = new Vector2(1),
|
||||||
ChildrenEnumerable = score.Mods.Select(mod => new ModIcon(mod) { Scale = new Vector2(0.375f) })
|
ChildrenEnumerable = score.Mods.Select(mod => new ModIcon(mod) { Scale = new Vector2(0.375f) })
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -171,6 +171,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
|||||||
{
|
{
|
||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal,
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Spacing = new Vector2(1),
|
||||||
ChildrenEnumerable = score.Mods.Select(m => new ModIcon(m)
|
ChildrenEnumerable = score.Mods.Select(m => new ModIcon(m)
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
|
@ -172,7 +172,8 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
|||||||
: this(new FillFlowContainer
|
: this(new FillFlowContainer
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Direction = FillDirection.Horizontal
|
Direction = FillDirection.Horizontal,
|
||||||
|
Spacing = new Vector2(1),
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -12,12 +12,13 @@ using osu.Game.Rulesets.UI;
|
|||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Profile.Sections.Ranks
|
namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||||
{
|
{
|
||||||
public abstract class DrawableProfileScore : DrawableProfileRow
|
public abstract class DrawableProfileScore : DrawableProfileRow
|
||||||
{
|
{
|
||||||
private readonly ScoreModsContainer modsContainer;
|
private readonly FillFlowContainer modsContainer;
|
||||||
protected readonly ScoreInfo Score;
|
protected readonly ScoreInfo Score;
|
||||||
|
|
||||||
protected DrawableProfileScore(ScoreInfo score)
|
protected DrawableProfileScore(ScoreInfo score)
|
||||||
@ -28,12 +29,12 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
|||||||
Height = 60;
|
Height = 60;
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
modsContainer = new ScoreModsContainer
|
modsContainer = new FillFlowContainer
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Both,
|
||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
Width = 60,
|
Spacing = new Vector2(1),
|
||||||
Margin = new MarginPadding { Right = 160 }
|
Margin = new MarginPadding { Right = 160 }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
|
||||||
|
|
||||||
using osuTK;
|
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Game.Rulesets.UI;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Profile.Sections.Ranks
|
|
||||||
{
|
|
||||||
public class ScoreModsContainer : FlowContainer<ModIcon>
|
|
||||||
{
|
|
||||||
protected override IEnumerable<Vector2> ComputeLayoutPositions()
|
|
||||||
{
|
|
||||||
int count = FlowingChildren.Count();
|
|
||||||
for (int i = 0; i < count; i++)
|
|
||||||
yield return new Vector2(DrawWidth * i * (count == 1 ? 0 : 1f / (count - 1)), 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user