1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 21:02:55 +08:00

AddButton now returns the button

This commit is contained in:
nanashi-1 2022-11-15 20:57:31 +08:00
parent 1186ed3e32
commit 5973bb1956

View File

@ -66,7 +66,7 @@ namespace osu.Game.Screens.Select.Options
/// <param name="colour">Colour of the button.</param>
/// <param name="icon">Icon of the button.</param>
/// <param name="action">Binding the button does.</param>
public void AddButton(LocalisableString firstLine, string secondLine, IconUsage icon, Color4 colour, Action action)
public BeatmapOptionsButton AddButton(LocalisableString firstLine, string secondLine, IconUsage icon, Color4 colour, Action action)
{
var button = new BeatmapOptionsButton
{
@ -82,6 +82,8 @@ namespace osu.Game.Screens.Select.Options
};
buttonsContainer.Add(button);
return button;
}
protected override void PopIn()