Fix a few missed renames

This commit is contained in:
smoogipoo
2018-11-06 18:06:34 +09:00
parent b3fa7c111b
commit 85f96ad62f
8 changed files with 28 additions and 28 deletions

View File

@ -15,6 +15,6 @@ namespace osu.Game.Rulesets.Osu.Edit
{ {
} }
public override PlacementBlueprint CreatePlacementMask() => new HitCirclePlacementBlueprint(); public override PlacementBlueprint CreatePlacementBlueprint() => new HitCirclePlacementBlueprint();
} }
} }

View File

@ -15,6 +15,6 @@ namespace osu.Game.Rulesets.Osu.Edit
{ {
} }
public override PlacementBlueprint CreatePlacementMask() => new SliderPlacementBlueprint(); public override PlacementBlueprint CreatePlacementBlueprint() => new SliderPlacementBlueprint();
} }
} }

View File

@ -15,6 +15,6 @@ namespace osu.Game.Rulesets.Osu.Edit
{ {
} }
public override PlacementBlueprint CreatePlacementMask() => new SpinnerPlacementBlueprint(); public override PlacementBlueprint CreatePlacementBlueprint() => new SpinnerPlacementBlueprint();
} }
} }

View File

@ -16,7 +16,7 @@ using OpenTK;
namespace osu.Game.Rulesets.Edit namespace osu.Game.Rulesets.Edit
{ {
/// <summary> /// <summary>
/// A mask which governs the creation of a new <see cref="HitObject"/> to actualisation. /// A blueprint which governs the creation of a new <see cref="HitObject"/> to actualisation.
/// </summary> /// </summary>
public abstract class PlacementBlueprint : CompositeDrawable, IRequireHighFrequencyMousePosition public abstract class PlacementBlueprint : CompositeDrawable, IRequireHighFrequencyMousePosition
{ {

View File

@ -15,7 +15,7 @@ using OpenTK;
namespace osu.Game.Rulesets.Edit namespace osu.Game.Rulesets.Edit
{ {
/// <summary> /// <summary>
/// A mask placed above a <see cref="DrawableHitObject"/> adding editing functionality. /// A blueprint placed above a <see cref="DrawableHitObject"/> adding editing functionality.
/// </summary> /// </summary>
public class SelectionBlueprint : CompositeDrawable, IStateful<SelectionState> public class SelectionBlueprint : CompositeDrawable, IStateful<SelectionState>
{ {

View File

@ -12,6 +12,6 @@ namespace osu.Game.Rulesets.Edit.Tools
Name = name; Name = name;
} }
public abstract PlacementBlueprint CreatePlacementMask(); public abstract PlacementBlueprint CreatePlacementBlueprint();
} }
} }

View File

@ -125,7 +125,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
{ {
placementBlueprintContainer.Clear(); placementBlueprintContainer.Clear();
var blueprint = CurrentTool?.CreatePlacementMask(); var blueprint = CurrentTool?.CreatePlacementBlueprint();
if (blueprint != null) if (blueprint != null)
placementBlueprintContainer.Child = blueprint; placementBlueprintContainer.Child = blueprint;
} }

View File

@ -25,7 +25,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
{ {
public const float BORDER_RADIUS = 2; public const float BORDER_RADIUS = 2;
private readonly List<SelectionBlueprint> selectedMasks; private readonly List<SelectionBlueprint> selectedBlueprints;
private Drawable outline; private Drawable outline;
@ -34,7 +34,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
public SelectionBox() public SelectionBox()
{ {
selectedMasks = new List<SelectionBlueprint>(); selectedBlueprints = new List<SelectionBlueprint>();
RelativeSizeAxes = Axes.Both; RelativeSizeAxes = Axes.Both;
AlwaysPresent = true; AlwaysPresent = true;
@ -64,9 +64,9 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
{ {
// Todo: Various forms of snapping // Todo: Various forms of snapping
foreach (var mask in selectedMasks) foreach (var blueprint in selectedBlueprints)
{ {
switch (mask.HitObject.HitObject) switch (blueprint.HitObject.HitObject)
{ {
case IHasEditablePosition editablePosition: case IHasEditablePosition editablePosition:
editablePosition.OffsetPosition(delta); editablePosition.OffsetPosition(delta);
@ -83,7 +83,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
switch (e.Key) switch (e.Key)
{ {
case Key.Delete: case Key.Delete:
foreach (var h in selectedMasks.ToList()) foreach (var h in selectedBlueprints.ToList())
placementHandler.Delete(h.HitObject.HitObject); placementHandler.Delete(h.HitObject.HitObject);
return true; return true;
} }
@ -96,33 +96,33 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
#region Selection Handling #region Selection Handling
/// <summary> /// <summary>
/// Bind an action to deselect all selected masks. /// Bind an action to deselect all selected blueprints.
/// </summary> /// </summary>
public Action DeselectAll { private get; set; } public Action DeselectAll { private get; set; }
/// <summary> /// <summary>
/// Handle a mask becoming selected. /// Handle a blueprint becoming selected.
/// </summary> /// </summary>
/// <param name="blueprint">The mask.</param> /// <param name="blueprint">The blueprint.</param>
public void HandleSelected(SelectionBlueprint blueprint) => selectedMasks.Add(blueprint); public void HandleSelected(SelectionBlueprint blueprint) => selectedBlueprints.Add(blueprint);
/// <summary> /// <summary>
/// Handle a mask becoming deselected. /// Handle a blueprint becoming deselected.
/// </summary> /// </summary>
/// <param name="blueprint">The mask.</param> /// <param name="blueprint">The blueprint.</param>
public void HandleDeselected(SelectionBlueprint blueprint) public void HandleDeselected(SelectionBlueprint blueprint)
{ {
selectedMasks.Remove(blueprint); selectedBlueprints.Remove(blueprint);
// We don't want to update visibility if > 0, since we may be deselecting masks during drag-selection // We don't want to update visibility if > 0, since we may be deselecting blueprints during drag-selection
if (selectedMasks.Count == 0) if (selectedBlueprints.Count == 0)
UpdateVisibility(); UpdateVisibility();
} }
/// <summary> /// <summary>
/// Handle a mask requesting selection. /// Handle a blueprint requesting selection.
/// </summary> /// </summary>
/// <param name="blueprint">The mask.</param> /// <param name="blueprint">The blueprint.</param>
public void HandleSelectionRequested(SelectionBlueprint blueprint, InputState state) public void HandleSelectionRequested(SelectionBlueprint blueprint, InputState state)
{ {
if (state.Keyboard.ControlPressed) if (state.Keyboard.ControlPressed)
@ -151,7 +151,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
/// </summary> /// </summary>
internal void UpdateVisibility() internal void UpdateVisibility()
{ {
if (selectedMasks.Count > 0) if (selectedBlueprints.Count > 0)
Show(); Show();
else else
Hide(); Hide();
@ -161,7 +161,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
{ {
base.Update(); base.Update();
if (selectedMasks.Count == 0) if (selectedBlueprints.Count == 0)
return; return;
// Move the rectangle to cover the hitobjects // Move the rectangle to cover the hitobjects
@ -170,10 +170,10 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
bool hasSelection = false; bool hasSelection = false;
foreach (var mask in selectedMasks) foreach (var blueprint in selectedBlueprints)
{ {
topLeft = Vector2.ComponentMin(topLeft, ToLocalSpace(mask.SelectionQuad.TopLeft)); topLeft = Vector2.ComponentMin(topLeft, ToLocalSpace(blueprint.SelectionQuad.TopLeft));
bottomRight = Vector2.ComponentMax(bottomRight, ToLocalSpace(mask.SelectionQuad.BottomRight)); bottomRight = Vector2.ComponentMax(bottomRight, ToLocalSpace(blueprint.SelectionQuad.BottomRight));
} }
topLeft -= new Vector2(5); topLeft -= new Vector2(5);