Add xmldocs and cleanup

This commit is contained in:
smoogipoo
2019-11-08 13:14:23 +09:00
parent 0a15a13fab
commit 011bf09516
4 changed files with 104 additions and 5 deletions

View File

@ -6,13 +6,27 @@ using osu.Framework.Graphics.Sprites;
namespace osu.Game.Graphics.UserInterface
{
/// <summary>
/// An <see cref="OsuMenuItem"/> which displays an enabled or disabled state.
/// </summary>
public class ToggleMenuItem : StatefulMenuItem<bool>
{
/// <summary>
/// Creates a new <see cref="ToggleMenuItem"/>.
/// </summary>
/// <param name="text">The text to display.</param>
/// <param name="type">The type of action which this <see cref="ToggleMenuItem"/> performs.</param>
public ToggleMenuItem(string text, MenuItemType type = MenuItemType.Standard)
: this(text, type, null)
{
}
/// <summary>
/// Creates a new <see cref="ToggleMenuItem"/>.
/// </summary>
/// <param name="text">The text to display.</param>
/// <param name="type">The type of action which this <see cref="ToggleMenuItem"/> performs.</param>
/// <param name="action">A delegate to be invoked when this <see cref="ToggleMenuItem"/> is pressed.</param>
public ToggleMenuItem(string text, MenuItemType type, Action<bool> action)
: base(text, value => !value, type, action)
{