mirror of
https://github.com/gwdevhub/Daybreak.git
synced 2026-07-24 12:06:34 +00:00
* Resolve warnings and move shared props to Directory.Build.props and Directory.Packages.props * Cleanup more messages * Fix more messages * Fix build issues
20 lines
504 B
C#
20 lines
504 B
C#
namespace Daybreak.Shared.Models.Menu;
|
|
public sealed class MenuCategory
|
|
{
|
|
private readonly List<MenuButton> buttons = [];
|
|
|
|
public string Name { get; init; }
|
|
public IReadOnlyList<MenuButton> Buttons => this.buttons;
|
|
|
|
internal MenuCategory(string name)
|
|
{
|
|
this.Name = name;
|
|
}
|
|
|
|
public MenuCategory RegisterButton(string name, string hint, Action<IServiceProvider> action)
|
|
{
|
|
this.buttons.Add(new MenuButton(name, hint, action));
|
|
return this;
|
|
}
|
|
}
|