mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 20:25:39 +08:00
Rename variables to match
This commit is contained in:
parent
22511c36c3
commit
346d14d40b
@ -44,7 +44,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
|
|
||||||
private readonly Bindable<TernaryState> distanceSnapToggle = new Bindable<TernaryState>();
|
private readonly Bindable<TernaryState> distanceSnapToggle = new Bindable<TernaryState>();
|
||||||
|
|
||||||
protected override IEnumerable<TernaryButton> CreateToggles() => base.CreateToggles().Concat(new[]
|
protected override IEnumerable<TernaryButton> CreateTernaryButtons() => base.CreateTernaryButtons().Concat(new[]
|
||||||
{
|
{
|
||||||
new TernaryButton(distanceSnapToggle, "Distance Snap", () => new SpriteIcon { Icon = FontAwesome.Solid.Ruler })
|
new TernaryButton(distanceSnapToggle, "Distance Snap", () => new SpriteIcon { Icon = FontAwesome.Solid.Ruler })
|
||||||
});
|
});
|
||||||
|
@ -6,7 +6,6 @@ using System.Collections.Generic;
|
|||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
@ -144,8 +143,8 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
.Select(t => new RadioButton(t.Name, () => toolSelected(t), t.CreateIcon))
|
.Select(t => new RadioButton(t.Name, () => toolSelected(t), t.CreateIcon))
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
Toggles = CreateToggles().ToArray();
|
TernaryStates = CreateTernaryButtons().ToArray();
|
||||||
togglesCollection.AddRange(Toggles.Select(b => new DrawableTernaryButton(b)));
|
togglesCollection.AddRange(TernaryStates.Select(b => new DrawableTernaryButton(b)));
|
||||||
|
|
||||||
setSelectTool();
|
setSelectTool();
|
||||||
|
|
||||||
@ -175,12 +174,14 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
protected abstract IReadOnlyList<HitObjectCompositionTool> CompositionTools { get; }
|
protected abstract IReadOnlyList<HitObjectCompositionTool> CompositionTools { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A collection of toggles which will be displayed to the user.
|
/// A collection of states which will be displayed to the user in the toolbox.
|
||||||
/// The display name will be decided by <see cref="Bindable{T}.Description"/>.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public TernaryButton[] Toggles { get; private set; }
|
public TernaryButton[] TernaryStates { get; private set; }
|
||||||
|
|
||||||
protected virtual IEnumerable<TernaryButton> CreateToggles() => BlueprintContainer.Toggles;
|
/// <summary>
|
||||||
|
/// Create all ternary states required to be displayed to the user.
|
||||||
|
/// </summary>
|
||||||
|
protected virtual IEnumerable<TernaryButton> CreateTernaryButtons() => BlueprintContainer.TernaryStates;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Construct a relevant blueprint container. This will manage hitobject selection/placement input handling and display logic.
|
/// Construct a relevant blueprint container. This will manage hitobject selection/placement input handling and display logic.
|
||||||
|
@ -51,7 +51,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
Toggles = CreateToggles().ToArray();
|
TernaryStates = CreateTernaryButtons().ToArray();
|
||||||
|
|
||||||
AddInternal(placementBlueprintContainer);
|
AddInternal(placementBlueprintContainer);
|
||||||
}
|
}
|
||||||
@ -77,9 +77,15 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
|
|
||||||
public readonly Bindable<TernaryState> NewCombo = new Bindable<TernaryState> { Description = "New Combo" };
|
public readonly Bindable<TernaryState> NewCombo = new Bindable<TernaryState> { Description = "New Combo" };
|
||||||
|
|
||||||
public TernaryButton[] Toggles { get; private set; }
|
/// <summary>
|
||||||
|
/// A collection of states which will be displayed to the user in the toolbox.
|
||||||
|
/// </summary>
|
||||||
|
public TernaryButton[] TernaryStates { get; private set; }
|
||||||
|
|
||||||
protected virtual IEnumerable<TernaryButton> CreateToggles()
|
/// <summary>
|
||||||
|
/// Create all ternary states required to be displayed to the user.
|
||||||
|
/// </summary>
|
||||||
|
protected virtual IEnumerable<TernaryButton> CreateTernaryButtons()
|
||||||
{
|
{
|
||||||
//TODO: this should only be enabled (visible?) for rulesets that provide combo-supporting HitObjects.
|
//TODO: this should only be enabled (visible?) for rulesets that provide combo-supporting HitObjects.
|
||||||
yield return new TernaryButton(NewCombo, "New combo", () => new SpriteIcon { Icon = FontAwesome.Regular.DotCircle });
|
yield return new TernaryButton(NewCombo, "New combo", () => new SpriteIcon { Icon = FontAwesome.Regular.DotCircle });
|
||||||
|
Loading…
Reference in New Issue
Block a user