mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 17:47:29 +08:00
Recolour info section
This commit is contained in:
parent
27c24fb08a
commit
873eda3bb5
@ -24,6 +24,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
private const float spacing = 20;
|
||||
|
||||
private readonly Box successRateBackground;
|
||||
private readonly Box background;
|
||||
private readonly SuccessRate successRate;
|
||||
|
||||
public readonly Bindable<BeatmapSetInfo> BeatmapSet = new Bindable<BeatmapSetInfo>();
|
||||
@ -50,10 +51,9 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
background = new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Color4.White,
|
||||
RelativeSizeAxes = Axes.Both
|
||||
},
|
||||
new Container
|
||||
{
|
||||
@ -126,14 +126,14 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
successRateBackground.Colour = colours.GrayE;
|
||||
successRateBackground.Colour = colourProvider.Background4;
|
||||
background.Colour = colourProvider.Background5;
|
||||
}
|
||||
|
||||
private class MetadataSection : FillFlowContainer
|
||||
{
|
||||
private readonly OsuSpriteText header;
|
||||
private readonly TextFlowContainer textFlow;
|
||||
|
||||
public string Text
|
||||
@ -148,7 +148,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
this.FadeIn(transition_duration);
|
||||
textFlow.Clear();
|
||||
textFlow.AddText(value, s => s.Font = s.Font.With(size: 14));
|
||||
textFlow.AddText(value, s => s.Font = s.Font.With(size: 12));
|
||||
}
|
||||
}
|
||||
|
||||
@ -160,11 +160,10 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
header = new OsuSpriteText
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = title,
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold),
|
||||
Shadow = false,
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Black),
|
||||
Margin = new MarginPadding { Top = 20 },
|
||||
},
|
||||
textFlow = new OsuTextFlowContainer
|
||||
@ -174,12 +173,6 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
header.Colour = textFlow.Colour = colours.Gray5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
protected readonly FailRetryGraph Graph;
|
||||
|
||||
private readonly FillFlowContainer header;
|
||||
private readonly OsuSpriteText successRateLabel, successPercent, graphLabel;
|
||||
private readonly OsuSpriteText successPercent;
|
||||
private readonly Bar successRate;
|
||||
private readonly Container percentContainer;
|
||||
|
||||
@ -60,7 +60,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
Direction = FillDirection.Vertical,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
successRateLabel = new OsuSpriteText
|
||||
new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
@ -85,7 +85,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
Font = OsuFont.GetFont(size: 13),
|
||||
},
|
||||
},
|
||||
graphLabel = new OsuSpriteText
|
||||
new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
@ -107,7 +107,6 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
successRateLabel.Colour = successPercent.Colour = graphLabel.Colour = colours.Gray5;
|
||||
successRate.AccentColour = colours.Green;
|
||||
successRate.BackgroundColour = colours.GrayD;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user