mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:17:26 +08:00
Add proper action to YearButton
This commit is contained in:
parent
e3ed9b8135
commit
d60478851f
@ -81,6 +81,9 @@ namespace osu.Game.Overlays.News.Sidebar
|
||||
{
|
||||
public int Year { get; }
|
||||
|
||||
[Resolved(canBeNull: true)]
|
||||
private NewsOverlay overlay { get; set; }
|
||||
|
||||
private readonly bool isCurrent;
|
||||
|
||||
public YearButton(int year, bool isCurrent)
|
||||
@ -106,7 +109,7 @@ namespace osu.Game.Overlays.News.Sidebar
|
||||
{
|
||||
IdleColour = isCurrent ? Color4.White : colourProvider.Light2;
|
||||
HoverColour = isCurrent ? Color4.White : colourProvider.Light1;
|
||||
Action = () => { }; // Avoid button being disabled since there's no proper action assigned.
|
||||
Action = () => overlay?.ShowYear(Year);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user