1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 03:22:55 +08:00

keep colour change when entry is clicked

This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-06-04 23:43:00 +07:00
parent 5febbe4530
commit a431ef6c48
No known key found for this signature in database
GPG Key ID: 25F6F17FD29031E2

View File

@ -74,6 +74,9 @@ namespace osu.Game.Overlays.Wiki
[Resolved]
private OverlayScrollContainer scrollContainer { get; set; }
[Resolved]
private OverlayColourProvider colourProvider { get; set; }
private readonly MarkdownHeading target;
private readonly OsuTextFlowContainer textFlow;
@ -100,7 +103,7 @@ namespace osu.Game.Overlays.Wiki
protected override IEnumerable<Drawable> EffectTargets => new Drawable[] { textFlow };
[BackgroundDependencyLoader]
private void load(OverlayColourProvider colourProvider)
private void load()
{
IdleColour = colourProvider.Light2;
HoverColour = colourProvider.Light1;
@ -108,6 +111,7 @@ namespace osu.Game.Overlays.Wiki
protected override bool OnClick(ClickEvent e)
{
IdleColour = colourProvider.Light1;
scrollContainer.ScrollTo(target);
return base.OnClick(e);
}