mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Rename button class
This commit is contained in:
@ -18,7 +18,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
{
|
{
|
||||||
typeof(OsuMenu),
|
typeof(OsuMenu),
|
||||||
typeof(StatefulMenuItem),
|
typeof(StatefulMenuItem),
|
||||||
typeof(ThreeStateMenuItem),
|
typeof(TernaryStateMenuItem),
|
||||||
typeof(DrawableStatefulMenuItem),
|
typeof(DrawableStatefulMenuItem),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -39,9 +39,9 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Items = new[]
|
Items = new[]
|
||||||
{
|
{
|
||||||
new ThreeStateMenuItem("First"),
|
new TernaryStateMenuItem("First"),
|
||||||
new ThreeStateMenuItem("Second") { State = { BindTarget = state } },
|
new TernaryStateMenuItem("Second") { State = { BindTarget = state } },
|
||||||
new ThreeStateMenuItem("Third") { State = { Value = TernaryState.True } },
|
new TernaryStateMenuItem("Third") { State = { Value = TernaryState.True } },
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -15,7 +15,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The current state is a combination of <see cref="False"/> and <see cref="True"/>.
|
/// 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>
|
/// </summary>
|
||||||
Indeterminate,
|
Indeterminate,
|
||||||
|
|
||||||
|
@ -9,37 +9,37 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// An <see cref="OsuMenuItem"/> with three possible states.
|
/// An <see cref="OsuMenuItem"/> with three possible states.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ThreeStateMenuItem : StatefulMenuItem<TernaryState>
|
public class TernaryStateMenuItem : StatefulMenuItem<TernaryState>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a new <see cref="ThreeStateMenuItem"/>.
|
/// Creates a new <see cref="TernaryStateMenuItem"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="text">The text to display.</param>
|
/// <param name="text">The text to display.</param>
|
||||||
/// <param name="type">The type of action which this <see cref="ThreeStateMenuItem"/> performs.</param>
|
/// <param name="type">The type of action which this <see cref="TernaryStateMenuItem"/> performs.</param>
|
||||||
public ThreeStateMenuItem(string text, MenuItemType type = MenuItemType.Standard)
|
public TernaryStateMenuItem(string text, MenuItemType type = MenuItemType.Standard)
|
||||||
: this(text, type, null)
|
: this(text, type, null)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a new <see cref="ThreeStateMenuItem"/>.
|
/// Creates a new <see cref="TernaryStateMenuItem"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="text">The text to display.</param>
|
/// <param name="text">The text to display.</param>
|
||||||
/// <param name="type">The type of action which this <see cref="ThreeStateMenuItem"/> performs.</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="ThreeStateMenuItem"/> is pressed.</param>
|
/// <param name="action">A delegate to be invoked when this <see cref="TernaryStateMenuItem"/> is pressed.</param>
|
||||||
public ThreeStateMenuItem(string text, MenuItemType type, Action<TernaryState> action)
|
public TernaryStateMenuItem(string text, MenuItemType type, Action<TernaryState> action)
|
||||||
: this(text, getNextState, type, action)
|
: this(text, getNextState, type, action)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a new <see cref="ThreeStateMenuItem"/>.
|
/// Creates a new <see cref="TernaryStateMenuItem"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="text">The text to display.</param>
|
/// <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="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="ThreeStateMenuItem"/> performs.</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="ThreeStateMenuItem"/> is pressed.</param>
|
/// <param name="action">A delegate to be invoked when this <see cref="TernaryStateMenuItem"/> is pressed.</param>
|
||||||
protected ThreeStateMenuItem(string text, Func<TernaryState, TernaryState> changeStateFunc, MenuItemType type, Action<TernaryState> action)
|
protected TernaryStateMenuItem(string text, Func<TernaryState, TernaryState> changeStateFunc, MenuItemType type, Action<TernaryState> action)
|
||||||
: base(text, changeStateFunc, type, action)
|
: base(text, changeStateFunc, type, action)
|
||||||
{
|
{
|
||||||
}
|
}
|
Reference in New Issue
Block a user