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