mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Rename radio button item
to label
This commit is contained in:
@ -72,10 +72,10 @@ namespace osu.Game.Tests.Visual.Editing
|
|||||||
AddStep("clear all control points", () => editorBeatmap.ControlPointInfo.Clear());
|
AddStep("clear all control points", () => editorBeatmap.ControlPointInfo.Clear());
|
||||||
|
|
||||||
AddAssert("Tool is selection", () => hitObjectComposer.ChildrenOfType<ComposeBlueprintContainer>().First().CurrentTool is SelectTool);
|
AddAssert("Tool is selection", () => hitObjectComposer.ChildrenOfType<ComposeBlueprintContainer>().First().CurrentTool is SelectTool);
|
||||||
AddAssert("Hitcircle button not clickable", () => !hitObjectComposer.ChildrenOfType<DrawableRadioButton>().First(d => d.Button.Item == "HitCircle").Enabled.Value);
|
AddAssert("Hitcircle button not clickable", () => !hitObjectComposer.ChildrenOfType<DrawableRadioButton>().First(d => d.Button.Label == "HitCircle").Enabled.Value);
|
||||||
AddStep("Add timing point", () => editorBeatmap.ControlPointInfo.Add(0, new TimingControlPoint()));
|
AddStep("Add timing point", () => editorBeatmap.ControlPointInfo.Add(0, new TimingControlPoint()));
|
||||||
AddAssert("Hitcircle button is clickable", () => hitObjectComposer.ChildrenOfType<DrawableRadioButton>().First(d => d.Button.Item == "HitCircle").Enabled.Value);
|
AddAssert("Hitcircle button is clickable", () => hitObjectComposer.ChildrenOfType<DrawableRadioButton>().First(d => d.Button.Label == "HitCircle").Enabled.Value);
|
||||||
AddStep("Change to hitcircle", () => hitObjectComposer.ChildrenOfType<DrawableRadioButton>().First(d => d.Button.Item == "HitCircle").Click());
|
AddStep("Change to hitcircle", () => hitObjectComposer.ChildrenOfType<DrawableRadioButton>().First(d => d.Button.Label == "HitCircle").Click());
|
||||||
AddAssert("Tool changed", () => hitObjectComposer.ChildrenOfType<ComposeBlueprintContainer>().First().CurrentTool is HitCircleCompositionTool);
|
AddAssert("Tool changed", () => hitObjectComposer.ChildrenOfType<ComposeBlueprintContainer>().First().CurrentTool is HitCircleCompositionTool);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,9 +39,9 @@ namespace osu.Game.Screens.Edit.Components.RadioButtons
|
|||||||
|
|
||||||
public DrawableRadioButton(RadioButton button)
|
public DrawableRadioButton(RadioButton button)
|
||||||
{
|
{
|
||||||
this.Button = button;
|
Button = button;
|
||||||
|
|
||||||
Text = button.Item.ToString();
|
Text = button.Label;
|
||||||
Action = button.Select;
|
Action = button.Select;
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Screens.Edit.Components.RadioButtons
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The item related to this button.
|
/// The item related to this button.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Item;
|
public string Label;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A function which creates a drawable icon to represent this item. If null, a sane default should be used.
|
/// A function which creates a drawable icon to represent this item. If null, a sane default should be used.
|
||||||
@ -26,9 +26,9 @@ namespace osu.Game.Screens.Edit.Components.RadioButtons
|
|||||||
|
|
||||||
private readonly Action action;
|
private readonly Action action;
|
||||||
|
|
||||||
public RadioButton(string item, Action action, Func<Drawable> createIcon = null)
|
public RadioButton(string label, Action action, Func<Drawable> createIcon = null)
|
||||||
{
|
{
|
||||||
Item = item;
|
Label = label;
|
||||||
CreateIcon = createIcon;
|
CreateIcon = createIcon;
|
||||||
this.action = action;
|
this.action = action;
|
||||||
Selected = new BindableBool();
|
Selected = new BindableBool();
|
||||||
|
Reference in New Issue
Block a user