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