mirror of
https://github.com/ppy/osu.git
synced 2025-02-04 08:12:59 +08:00
Use OsuGame.SHEAR
This commit is contained in:
parent
6f729be573
commit
5f8f6caedd
@ -63,7 +63,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Spacing = new Vector2(0f, 2f),
|
Spacing = new Vector2(0f, 2f),
|
||||||
Shear = LeaderboardScoreV2.SHEAR
|
Shear = new Vector2(OsuGame.SHEAR, 0)
|
||||||
},
|
},
|
||||||
drawWidthText = new OsuSpriteText(),
|
drawWidthText = new OsuSpriteText(),
|
||||||
};
|
};
|
||||||
|
@ -65,9 +65,6 @@ namespace osu.Game.Screens.SelectV2.Leaderboards
|
|||||||
private Colour4 backgroundColour;
|
private Colour4 backgroundColour;
|
||||||
private ColourInfo totalScoreBackgroundGradient;
|
private ColourInfo totalScoreBackgroundGradient;
|
||||||
|
|
||||||
// TODO: once https://github.com/ppy/osu/pull/28183 is merged, probably use OsuGame.SHEAR
|
|
||||||
public static readonly Vector2 SHEAR = new Vector2(0.15f, 0);
|
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private OverlayColourProvider colourProvider { get; set; } = null!;
|
private OverlayColourProvider colourProvider { get; set; } = null!;
|
||||||
|
|
||||||
@ -113,7 +110,7 @@ namespace osu.Game.Screens.SelectV2.Leaderboards
|
|||||||
this.rank = rank;
|
this.rank = rank;
|
||||||
this.isPersonalBest = isPersonalBest;
|
this.isPersonalBest = isPersonalBest;
|
||||||
|
|
||||||
Shear = SHEAR;
|
Shear = new Vector2(OsuGame.SHEAR, 0);
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Height = height;
|
Height = height;
|
||||||
}
|
}
|
||||||
@ -246,7 +243,7 @@ namespace osu.Game.Screens.SelectV2.Leaderboards
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
User = score.User,
|
User = score.User,
|
||||||
Shear = -SHEAR,
|
Shear = new Vector2(-OsuGame.SHEAR, 0),
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
Colour = ColourInfo.GradientHorizontal(Colour4.White.Opacity(0.5f), Colour4.FromHex(@"222A27").Opacity(1)),
|
Colour = ColourInfo.GradientHorizontal(Colour4.White.Opacity(0.5f), Colour4.FromHex(@"222A27").Opacity(1)),
|
||||||
@ -277,7 +274,7 @@ namespace osu.Game.Screens.SelectV2.Leaderboards
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Scale = new Vector2(1.1f),
|
Scale = new Vector2(1.1f),
|
||||||
Shear = -SHEAR,
|
Shear = new Vector2(-OsuGame.SHEAR, 0),
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
@ -317,7 +314,7 @@ namespace osu.Game.Screens.SelectV2.Leaderboards
|
|||||||
{
|
{
|
||||||
flagBadgeAndDateContainer = new FillFlowContainer
|
flagBadgeAndDateContainer = new FillFlowContainer
|
||||||
{
|
{
|
||||||
Shear = -SHEAR,
|
Shear = new Vector2(-OsuGame.SHEAR, 0),
|
||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal,
|
||||||
Spacing = new Vector2(5),
|
Spacing = new Vector2(5),
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
@ -341,7 +338,7 @@ namespace osu.Game.Screens.SelectV2.Leaderboards
|
|||||||
nameLabel = new TruncatingSpriteText
|
nameLabel = new TruncatingSpriteText
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Shear = -SHEAR,
|
Shear = new Vector2(-OsuGame.SHEAR, 0),
|
||||||
Text = user.Username,
|
Text = user.Username,
|
||||||
Font = OsuFont.GetFont(size: 20, weight: FontWeight.SemiBold)
|
Font = OsuFont.GetFont(size: 20, weight: FontWeight.SemiBold)
|
||||||
}
|
}
|
||||||
@ -357,7 +354,7 @@ namespace osu.Game.Screens.SelectV2.Leaderboards
|
|||||||
Name = @"Statistics container",
|
Name = @"Statistics container",
|
||||||
Padding = new MarginPadding { Right = 40 },
|
Padding = new MarginPadding { Right = 40 },
|
||||||
Spacing = new Vector2(25, 0),
|
Spacing = new Vector2(25, 0),
|
||||||
Shear = -SHEAR,
|
Shear = new Vector2(-OsuGame.SHEAR, 0),
|
||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
@ -415,7 +412,7 @@ namespace osu.Game.Screens.SelectV2.Leaderboards
|
|||||||
},
|
},
|
||||||
RankContainer = new Container
|
RankContainer = new Container
|
||||||
{
|
{
|
||||||
Shear = -SHEAR,
|
Shear = new Vector2(-OsuGame.SHEAR, 0),
|
||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
@ -473,7 +470,7 @@ namespace osu.Game.Screens.SelectV2.Leaderboards
|
|||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopRight,
|
||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopRight,
|
||||||
UseFullGlyphHeight = false,
|
UseFullGlyphHeight = false,
|
||||||
Shear = -SHEAR,
|
Shear = new Vector2(-OsuGame.SHEAR, 0),
|
||||||
Current = scoreManager.GetBindableTotalScoreString(score),
|
Current = scoreManager.GetBindableTotalScoreString(score),
|
||||||
Font = OsuFont.GetFont(size: 30, weight: FontWeight.Light),
|
Font = OsuFont.GetFont(size: 30, weight: FontWeight.Light),
|
||||||
},
|
},
|
||||||
@ -481,7 +478,7 @@ namespace osu.Game.Screens.SelectV2.Leaderboards
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopRight,
|
||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopRight,
|
||||||
Shear = -SHEAR,
|
Shear = new Vector2(-OsuGame.SHEAR, 0),
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal,
|
||||||
Spacing = new Vector2(2f, 0f),
|
Spacing = new Vector2(2f, 0f),
|
||||||
@ -666,7 +663,7 @@ namespace osu.Game.Screens.SelectV2.Leaderboards
|
|||||||
|
|
||||||
Child = new OsuSpriteText
|
Child = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Shear = -SHEAR,
|
Shear = new Vector2(-OsuGame.SHEAR, 0),
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Font = OsuFont.GetFont(size: 20, weight: FontWeight.SemiBold, italics: true),
|
Font = OsuFont.GetFont(size: 20, weight: FontWeight.SemiBold, italics: true),
|
||||||
|
Loading…
Reference in New Issue
Block a user