mirror of https://github.com/ppy/osu
Fix wrong date colour of kudosu history items
This commit is contained in:
parent
bfca75395b
commit
67a3ea2c59
|
@ -5,12 +5,12 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Game.Overlays;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
|
@ -18,6 +18,9 @@ public partial class TestSceneKudosuHistory : OsuTestScene
|
|||
{
|
||||
private readonly Box background;
|
||||
|
||||
[Cached]
|
||||
private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Pink);
|
||||
|
||||
public TestSceneKudosuHistory()
|
||||
{
|
||||
FillFlowContainer<DrawableKudosuHistoryItem> content;
|
||||
|
@ -42,9 +45,9 @@ public TestSceneKudosuHistory()
|
|||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load()
|
||||
{
|
||||
background.Colour = colours.GreySeaFoam;
|
||||
background.Colour = colourProvider.Background4;
|
||||
}
|
||||
|
||||
private readonly IEnumerable<APIKudosuHistory> items = new[]
|
||||
|
|
|
@ -17,9 +17,6 @@ public partial class DrawableKudosuHistoryItem : CompositeDrawable
|
|||
{
|
||||
private const int height = 25;
|
||||
|
||||
[Resolved]
|
||||
private OsuColour colours { get; set; } = null!;
|
||||
|
||||
private readonly APIKudosuHistory historyItem;
|
||||
private readonly LinkFlowContainer linkFlowContainer;
|
||||
private readonly DrawableDate date;
|
||||
|
@ -48,9 +45,9 @@ public DrawableKudosuHistoryItem(APIKudosuHistory historyItem)
|
|||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
date.Colour = colours.GreySeaFoamLighter;
|
||||
date.Colour = colourProvider.Foreground1;
|
||||
var formattedSource = MessageFormatter.FormatText(getString(historyItem));
|
||||
linkFlowContainer.AddLinks(formattedSource.Text, formattedSource.Links);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue