mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 16:52:54 +08:00
move scroll to into action
This commit is contained in:
parent
a431ef6c48
commit
f07d4532d9
@ -71,9 +71,6 @@ namespace osu.Game.Overlays.Wiki
|
||||
|
||||
private class TableOfContentsEntry : OsuHoverContainer
|
||||
{
|
||||
[Resolved]
|
||||
private OverlayScrollContainer scrollContainer { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private OverlayColourProvider colourProvider { get; set; }
|
||||
|
||||
@ -103,16 +100,16 @@ namespace osu.Game.Overlays.Wiki
|
||||
protected override IEnumerable<Drawable> EffectTargets => new Drawable[] { textFlow };
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
private void load(OverlayScrollContainer scrollContainer)
|
||||
{
|
||||
IdleColour = colourProvider.Light2;
|
||||
HoverColour = colourProvider.Light1;
|
||||
Action = () => scrollContainer.ScrollTo(target);
|
||||
}
|
||||
|
||||
protected override bool OnClick(ClickEvent e)
|
||||
{
|
||||
IdleColour = colourProvider.Light1;
|
||||
scrollContainer.ScrollTo(target);
|
||||
return base.OnClick(e);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user