mirror of
https://github.com/ppy/osu.git
synced 2025-03-18 04:07:44 +08:00
Rename radio button item
to label
This commit is contained in:
parent
eac9b1ec7e
commit
50eed26bd1
@ -72,10 +72,10 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
AddStep("clear all control points", () => editorBeatmap.ControlPointInfo.Clear());
|
||||
|
||||
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()));
|
||||
AddAssert("Hitcircle button is clickable", () => hitObjectComposer.ChildrenOfType<DrawableRadioButton>().First(d => d.Button.Item == "HitCircle").Enabled.Value);
|
||||
AddStep("Change to hitcircle", () => hitObjectComposer.ChildrenOfType<DrawableRadioButton>().First(d => d.Button.Item == "HitCircle").Click());
|
||||
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.Label == "HitCircle").Click());
|
||||
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)
|
||||
{
|
||||
this.Button = button;
|
||||
Button = button;
|
||||
|
||||
Text = button.Item.ToString();
|
||||
Text = button.Label;
|
||||
Action = button.Select;
|
||||
|
||||
RelativeSizeAxes = Axes.X;
|
||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Screens.Edit.Components.RadioButtons
|
||||
/// <summary>
|
||||
/// The item related to this button.
|
||||
/// </summary>
|
||||
public string Item;
|
||||
public string Label;
|
||||
|
||||
/// <summary>
|
||||
/// 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;
|
||||
|
||||
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;
|
||||
this.action = action;
|
||||
Selected = new BindableBool();
|
||||
|
Loading…
x
Reference in New Issue
Block a user