mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 12:17:46 +08:00
changed SpriteText to OsuSpriteText
This commit is contained in:
parent
d0b4f86725
commit
017281246d
@ -11,6 +11,7 @@ using osu.Framework.Graphics.Primitives;
|
|||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Graphics.Sprites;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -19,9 +20,9 @@ namespace osu.Game.Screens.Select.Details
|
|||||||
{
|
{
|
||||||
public class BeatmapDetails : Container
|
public class BeatmapDetails : Container
|
||||||
{
|
{
|
||||||
private readonly SpriteText description;
|
private readonly OsuSpriteText description;
|
||||||
private readonly SpriteText source;
|
private readonly OsuSpriteText source;
|
||||||
private readonly FillFlowContainer<SpriteText> tags;
|
private readonly FillFlowContainer<OsuSpriteText> tags;
|
||||||
|
|
||||||
private readonly DifficultyRow circleSize;
|
private readonly DifficultyRow circleSize;
|
||||||
private readonly DifficultyRow drainRate;
|
private readonly DifficultyRow drainRate;
|
||||||
@ -30,8 +31,8 @@ namespace osu.Game.Screens.Select.Details
|
|||||||
private readonly DifficultyRow stars;
|
private readonly DifficultyRow stars;
|
||||||
|
|
||||||
private readonly BeatmapDetailsBar ratingsBar;
|
private readonly BeatmapDetailsBar ratingsBar;
|
||||||
private readonly SpriteText negativeRatings;
|
private readonly OsuSpriteText negativeRatings;
|
||||||
private readonly SpriteText positiveRatings;
|
private readonly OsuSpriteText positiveRatings;
|
||||||
private readonly BeatmapDetailsGraph ratingsGraph;
|
private readonly BeatmapDetailsGraph ratingsGraph;
|
||||||
|
|
||||||
private readonly BeatmapDetailsGraph retryGraph;
|
private readonly BeatmapDetailsGraph retryGraph;
|
||||||
@ -51,10 +52,9 @@ namespace osu.Game.Screens.Select.Details
|
|||||||
beatmap = value;
|
beatmap = value;
|
||||||
description.Text = beatmap.Version;
|
description.Text = beatmap.Version;
|
||||||
source.Text = beatmap.Metadata.Source;
|
source.Text = beatmap.Metadata.Source;
|
||||||
tags.Children = beatmap.Metadata.Tags?.Split(' ').Select(text => new SpriteText
|
tags.Children = beatmap.Metadata.Tags?.Split(' ').Select(text => new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = text,
|
Text = text,
|
||||||
TextSize = 14,
|
|
||||||
Font = "Exo2.0-Medium",
|
Font = "Exo2.0-Medium",
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -140,39 +140,34 @@ namespace osu.Game.Screens.Select.Details
|
|||||||
Padding = new MarginPadding(10) { Top = 25 },
|
Padding = new MarginPadding(10) { Top = 25 },
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new SpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = "Description",
|
Text = "Description",
|
||||||
TextSize = 14,
|
|
||||||
Font = @"Exo2.0-Bold",
|
Font = @"Exo2.0-Bold",
|
||||||
},
|
},
|
||||||
description = new SpriteText
|
description = new OsuSpriteText
|
||||||
{
|
{
|
||||||
TextSize = 14,
|
|
||||||
Font = @"Exo2.0-Medium",
|
Font = @"Exo2.0-Medium",
|
||||||
Direction = FillDirection.Full,
|
Direction = FillDirection.Full,
|
||||||
},
|
},
|
||||||
new SpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = "Source",
|
Text = "Source",
|
||||||
TextSize = 14,
|
|
||||||
Font = @"Exo2.0-Bold",
|
Font = @"Exo2.0-Bold",
|
||||||
Margin = new MarginPadding { Top = 20 },
|
Margin = new MarginPadding { Top = 20 },
|
||||||
},
|
},
|
||||||
source = new SpriteText
|
source = new OsuSpriteText
|
||||||
{
|
{
|
||||||
TextSize = 14,
|
|
||||||
Font = @"Exo2.0-Medium",
|
Font = @"Exo2.0-Medium",
|
||||||
Direction = FillDirection.Full,
|
Direction = FillDirection.Full,
|
||||||
},
|
},
|
||||||
new SpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = "Tags",
|
Text = "Tags",
|
||||||
TextSize = 14,
|
|
||||||
Font = @"Exo2.0-Bold",
|
Font = @"Exo2.0-Bold",
|
||||||
Margin = new MarginPadding { Top = 20 },
|
Margin = new MarginPadding { Top = 20 },
|
||||||
},
|
},
|
||||||
tags = new FillFlowContainer<SpriteText>
|
tags = new FillFlowContainer<OsuSpriteText>
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Spacing = new Vector2(3,0),
|
Spacing = new Vector2(3,0),
|
||||||
@ -265,10 +260,9 @@ namespace osu.Game.Screens.Select.Details
|
|||||||
Padding = new MarginPadding(15) { Top = 25, Bottom = 0 },
|
Padding = new MarginPadding(15) { Top = 25, Bottom = 0 },
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new SpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = "User Rating",
|
Text = "User Rating",
|
||||||
TextSize = 14,
|
|
||||||
Font = @"Exo2.0-Medium",
|
Font = @"Exo2.0-Medium",
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
@ -285,15 +279,13 @@ namespace osu.Game.Screens.Select.Details
|
|||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
negativeRatings = new SpriteText
|
negativeRatings = new OsuSpriteText
|
||||||
{
|
{
|
||||||
TextSize = 14,
|
|
||||||
Font = @"Exo2.0-Medium",
|
Font = @"Exo2.0-Medium",
|
||||||
Text = "0",
|
Text = "0",
|
||||||
},
|
},
|
||||||
positiveRatings = new SpriteText
|
positiveRatings = new OsuSpriteText
|
||||||
{
|
{
|
||||||
TextSize = 14,
|
|
||||||
Font = @"Exo2.0-Medium",
|
Font = @"Exo2.0-Medium",
|
||||||
Text = "0",
|
Text = "0",
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopRight,
|
||||||
@ -301,7 +293,7 @@ namespace osu.Game.Screens.Select.Details
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
new SpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = "Rating Spread",
|
Text = "Rating Spread",
|
||||||
TextSize = 14,
|
TextSize = 14,
|
||||||
@ -319,10 +311,9 @@ namespace osu.Game.Screens.Select.Details
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
new SpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = "Points of Failure",
|
Text = "Points of Failure",
|
||||||
TextSize = 14,
|
|
||||||
Font = @"Exo2.0-Medium",
|
Font = @"Exo2.0-Medium",
|
||||||
},
|
},
|
||||||
new Container<BeatmapDetailsGraph>
|
new Container<BeatmapDetailsGraph>
|
||||||
@ -365,9 +356,9 @@ namespace osu.Game.Screens.Select.Details
|
|||||||
|
|
||||||
private class DifficultyRow : Container
|
private class DifficultyRow : Container
|
||||||
{
|
{
|
||||||
private readonly SpriteText name;
|
private readonly OsuSpriteText name;
|
||||||
private readonly BeatmapDetailsBar bar;
|
private readonly BeatmapDetailsBar bar;
|
||||||
private readonly SpriteText valueText;
|
private readonly OsuSpriteText valueText;
|
||||||
|
|
||||||
private float difficultyValue;
|
private float difficultyValue;
|
||||||
public float Value
|
public float Value
|
||||||
@ -426,9 +417,8 @@ namespace osu.Game.Screens.Select.Details
|
|||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
name = new SpriteText
|
name = new OsuSpriteText
|
||||||
{
|
{
|
||||||
TextSize = 14,
|
|
||||||
Font = @"Exo2.0-Medium",
|
Font = @"Exo2.0-Medium",
|
||||||
},
|
},
|
||||||
bar = new BeatmapDetailsBar
|
bar = new BeatmapDetailsBar
|
||||||
@ -439,11 +429,10 @@ namespace osu.Game.Screens.Select.Details
|
|||||||
Size = new Vector2(1, 0.35f),
|
Size = new Vector2(1, 0.35f),
|
||||||
Padding = new MarginPadding { Left = 100, Right = 25 },
|
Padding = new MarginPadding { Left = 100, Right = 25 },
|
||||||
},
|
},
|
||||||
valueText = new SpriteText
|
valueText = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopRight,
|
||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopRight,
|
||||||
TextSize = 14,
|
|
||||||
Font = @"Exo2.0-Medium",
|
Font = @"Exo2.0-Medium",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user