// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using System.Collections.Generic; using osu.Framework.Bindables; using osu.Framework.Localisation; namespace osu.Framework.Graphics.UserInterface { public class MenuItem { /// /// The text which this displays. /// public readonly Bindable Text = new Bindable(string.Empty); /// /// The that is performed when this is clicked. /// public readonly Bindable Action = new Bindable(); /// /// A list of items which are to be displayed in a sub-menu originating from this . /// public IReadOnlyList Items = Array.Empty(); /// /// Creates a new . /// /// The text to display. public MenuItem(LocalisableString text) { Text.Value = text; } /// /// Creates a new . /// /// The text to display. /// The to perform when clicked. public MenuItem(LocalisableString text, Action action) : this(text) { Action.Value = action; } } }