1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 03:27:24 +08:00

Rename button class

This commit is contained in:
Dean Herbert 2019-11-12 10:18:25 +09:00
parent 54da8e4035
commit 5bb65d0716
3 changed files with 18 additions and 18 deletions

View File

@ -18,7 +18,7 @@ namespace osu.Game.Tests.Visual.UserInterface
{
typeof(OsuMenu),
typeof(StatefulMenuItem),
typeof(ThreeStateMenuItem),
typeof(TernaryStateMenuItem),
typeof(DrawableStatefulMenuItem),
};
@ -39,9 +39,9 @@ namespace osu.Game.Tests.Visual.UserInterface
Origin = Anchor.Centre,
Items = new[]
{
new ThreeStateMenuItem("First"),
new ThreeStateMenuItem("Second") { State = { BindTarget = state } },
new ThreeStateMenuItem("Third") { State = { Value = TernaryState.True } },
new TernaryStateMenuItem("First"),
new TernaryStateMenuItem("Second") { State = { BindTarget = state } },
new TernaryStateMenuItem("Third") { State = { Value = TernaryState.True } },
}
};
});

View File

@ -15,7 +15,7 @@ namespace osu.Game.Graphics.UserInterface
/// <summary>
/// The current state is a combination of <see cref="False"/> and <see cref="True"/>.
/// The state becomes <see cref="True"/> if the <see cref="ThreeStateMenuItem"/> is pressed.
/// The state becomes <see cref="True"/> if the <see cref="TernaryStateMenuItem"/> is pressed.
/// </summary>
Indeterminate,

View File

@ -9,37 +9,37 @@ namespace osu.Game.Graphics.UserInterface
/// <summary>
/// An <see cref="OsuMenuItem"/> with three possible states.
/// </summary>
public class ThreeStateMenuItem : StatefulMenuItem<TernaryState>
public class TernaryStateMenuItem : StatefulMenuItem<TernaryState>
{
/// <summary>
/// Creates a new <see cref="ThreeStateMenuItem"/>.
/// Creates a new <see cref="TernaryStateMenuItem"/>.
/// </summary>
/// <param name="text">The text to display.</param>
/// <param name="type">The type of action which this <see cref="ThreeStateMenuItem"/> performs.</param>
public ThreeStateMenuItem(string text, MenuItemType type = MenuItemType.Standard)
/// <param name="type">The type of action which this <see cref="TernaryStateMenuItem"/> performs.</param>
public TernaryStateMenuItem(string text, MenuItemType type = MenuItemType.Standard)
: this(text, type, null)
{
}
/// <summary>
/// Creates a new <see cref="ThreeStateMenuItem"/>.
/// Creates a new <see cref="TernaryStateMenuItem"/>.
/// </summary>
/// <param name="text">The text to display.</param>
/// <param name="type">The type of action which this <see cref="ThreeStateMenuItem"/> performs.</param>
/// <param name="action">A delegate to be invoked when this <see cref="ThreeStateMenuItem"/> is pressed.</param>
public ThreeStateMenuItem(string text, MenuItemType type, Action<TernaryState> action)
/// <param name="type">The type of action which this <see cref="TernaryStateMenuItem"/> performs.</param>
/// <param name="action">A delegate to be invoked when this <see cref="TernaryStateMenuItem"/> is pressed.</param>
public TernaryStateMenuItem(string text, MenuItemType type, Action<TernaryState> action)
: this(text, getNextState, type, action)
{
}
/// <summary>
/// Creates a new <see cref="ThreeStateMenuItem"/>.
/// Creates a new <see cref="TernaryStateMenuItem"/>.
/// </summary>
/// <param name="text">The text to display.</param>
/// <param name="changeStateFunc">A function that mutates a state to another state after this <see cref="ThreeStateMenuItem"/> is pressed.</param>
/// <param name="type">The type of action which this <see cref="ThreeStateMenuItem"/> performs.</param>
/// <param name="action">A delegate to be invoked when this <see cref="ThreeStateMenuItem"/> is pressed.</param>
protected ThreeStateMenuItem(string text, Func<TernaryState, TernaryState> changeStateFunc, MenuItemType type, Action<TernaryState> action)
/// <param name="changeStateFunc">A function that mutates a state to another state after this <see cref="TernaryStateMenuItem"/> is pressed.</param>
/// <param name="type">The type of action which this <see cref="TernaryStateMenuItem"/> performs.</param>
/// <param name="action">A delegate to be invoked when this <see cref="TernaryStateMenuItem"/> is pressed.</param>
protected TernaryStateMenuItem(string text, Func<TernaryState, TernaryState> changeStateFunc, MenuItemType type, Action<TernaryState> action)
: base(text, changeStateFunc, type, action)
{
}