mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:12:54 +08:00
PlacementMask -> PlacementBlueprint
This commit is contained in:
parent
11be820efe
commit
bd775af274
@ -14,6 +14,6 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
public class TestCaseHitCirclePlacementMask : HitObjectPlacementMaskTestCase
|
public class TestCaseHitCirclePlacementMask : HitObjectPlacementMaskTestCase
|
||||||
{
|
{
|
||||||
protected override DrawableHitObject CreateHitObject(HitObject hitObject) => new DrawableHitCircle((HitCircle)hitObject);
|
protected override DrawableHitObject CreateHitObject(HitObject hitObject) => new DrawableHitCircle((HitCircle)hitObject);
|
||||||
protected override PlacementMask CreateMask() => new HitCirclePlacementMask();
|
protected override PlacementBlueprint CreateMask() => new HitCirclePlacementBlueprint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,6 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
public class TestCaseSliderPlacementMask : HitObjectPlacementMaskTestCase
|
public class TestCaseSliderPlacementMask : HitObjectPlacementMaskTestCase
|
||||||
{
|
{
|
||||||
protected override DrawableHitObject CreateHitObject(HitObject hitObject) => new DrawableSlider((Slider)hitObject);
|
protected override DrawableHitObject CreateHitObject(HitObject hitObject) => new DrawableSlider((Slider)hitObject);
|
||||||
protected override PlacementMask CreateMask() => new SliderPlacementMask();
|
protected override PlacementBlueprint CreateMask() => new SliderPlacementBlueprint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,6 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
{
|
{
|
||||||
protected override DrawableHitObject CreateHitObject(HitObject hitObject) => new DrawableSpinner((Spinner)hitObject);
|
protected override DrawableHitObject CreateHitObject(HitObject hitObject) => new DrawableSpinner((Spinner)hitObject);
|
||||||
|
|
||||||
protected override PlacementMask CreateMask() => new SpinnerPlacementMask();
|
protected override PlacementBlueprint CreateMask() => new SpinnerPlacementBlueprint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,6 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override PlacementMask CreatePlacementMask() => new HitCirclePlacementMask();
|
public override PlacementBlueprint CreatePlacementMask() => new HitCirclePlacementBlueprint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,11 +8,11 @@ using osu.Game.Rulesets.Osu.Objects;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Edit.Masks.HitCircleMasks
|
namespace osu.Game.Rulesets.Osu.Edit.Masks.HitCircleMasks
|
||||||
{
|
{
|
||||||
public class HitCirclePlacementMask : PlacementMask
|
public class HitCirclePlacementBlueprint : PlacementBlueprint
|
||||||
{
|
{
|
||||||
public new HitCircle HitObject => (HitCircle)base.HitObject;
|
public new HitCircle HitObject => (HitCircle)base.HitObject;
|
||||||
|
|
||||||
public HitCirclePlacementMask()
|
public HitCirclePlacementBlueprint()
|
||||||
: base(new HitCircle())
|
: base(new HitCircle())
|
||||||
{
|
{
|
||||||
InternalChild = new HitCirclePiece(HitObject);
|
InternalChild = new HitCirclePiece(HitObject);
|
@ -18,7 +18,7 @@ using OpenTK.Input;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Edit.Masks.SliderMasks
|
namespace osu.Game.Rulesets.Osu.Edit.Masks.SliderMasks
|
||||||
{
|
{
|
||||||
public class SliderPlacementMask : PlacementMask
|
public class SliderPlacementBlueprint : PlacementBlueprint
|
||||||
{
|
{
|
||||||
public new Objects.Slider HitObject => (Objects.Slider)base.HitObject;
|
public new Objects.Slider HitObject => (Objects.Slider)base.HitObject;
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Masks.SliderMasks
|
|||||||
|
|
||||||
private PlacementState state;
|
private PlacementState state;
|
||||||
|
|
||||||
public SliderPlacementMask()
|
public SliderPlacementBlueprint()
|
||||||
: base(new Objects.Slider())
|
: base(new Objects.Slider())
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
@ -10,7 +10,7 @@ using osu.Game.Rulesets.Osu.UI;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Edit.Masks.SpinnerMasks
|
namespace osu.Game.Rulesets.Osu.Edit.Masks.SpinnerMasks
|
||||||
{
|
{
|
||||||
public class SpinnerPlacementMask : PlacementMask
|
public class SpinnerPlacementBlueprint : PlacementBlueprint
|
||||||
{
|
{
|
||||||
public new Spinner HitObject => (Spinner)base.HitObject;
|
public new Spinner HitObject => (Spinner)base.HitObject;
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Masks.SpinnerMasks
|
|||||||
|
|
||||||
private bool isPlacingEnd;
|
private bool isPlacingEnd;
|
||||||
|
|
||||||
public SpinnerPlacementMask()
|
public SpinnerPlacementBlueprint()
|
||||||
: base(new Spinner { Position = OsuPlayfield.BASE_SIZE / 2 })
|
: base(new Spinner { Position = OsuPlayfield.BASE_SIZE / 2 })
|
||||||
{
|
{
|
||||||
InternalChild = piece = new SpinnerPiece(HitObject) { Alpha = 0.5f };
|
InternalChild = piece = new SpinnerPiece(HitObject) { Alpha = 0.5f };
|
@ -15,6 +15,6 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override PlacementMask CreatePlacementMask() => new SliderPlacementMask();
|
public override PlacementBlueprint CreatePlacementMask() => new SliderPlacementBlueprint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,6 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override PlacementMask CreatePlacementMask() => new SpinnerPlacementMask();
|
public override PlacementBlueprint CreatePlacementMask() => new SpinnerPlacementBlueprint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
typeof(NotNullAttribute),
|
typeof(NotNullAttribute),
|
||||||
typeof(HitCirclePiece),
|
typeof(HitCirclePiece),
|
||||||
typeof(HitCircleSelectionBlueprint),
|
typeof(HitCircleSelectionBlueprint),
|
||||||
typeof(HitCirclePlacementMask),
|
typeof(HitCirclePlacementBlueprint),
|
||||||
};
|
};
|
||||||
|
|
||||||
private HitObjectComposer composer;
|
private HitObjectComposer composer;
|
||||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// A mask which governs the creation of a new <see cref="HitObject"/> to actualisation.
|
/// A mask which governs the creation of a new <see cref="HitObject"/> to actualisation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class PlacementMask : CompositeDrawable, IRequireHighFrequencyMousePosition
|
public abstract class PlacementBlueprint : CompositeDrawable, IRequireHighFrequencyMousePosition
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The <see cref="HitObject"/> that is being placed.
|
/// The <see cref="HitObject"/> that is being placed.
|
||||||
@ -32,7 +32,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private IPlacementHandler placementHandler { get; set; }
|
private IPlacementHandler placementHandler { get; set; }
|
||||||
|
|
||||||
protected PlacementMask(HitObject hitObject)
|
protected PlacementBlueprint(HitObject hitObject)
|
||||||
{
|
{
|
||||||
HitObject = hitObject;
|
HitObject = hitObject;
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Signals that the placement of <see cref="HitObject"/> has finished.
|
/// Signals that the placement of <see cref="HitObject"/> has finished.
|
||||||
/// This will destroy this <see cref="PlacementMask"/>, and add the <see cref="HitObject"/> to the <see cref="Beatmap"/>.
|
/// This will destroy this <see cref="PlacementBlueprint"/>, and add the <see cref="HitObject"/> to the <see cref="Beatmap"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected void EndPlacement()
|
protected void EndPlacement()
|
||||||
{
|
{
|
@ -12,6 +12,6 @@ namespace osu.Game.Rulesets.Edit.Tools
|
|||||||
Name = name;
|
Name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract PlacementMask CreatePlacementMask();
|
public abstract PlacementBlueprint CreatePlacementMask();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
|
|||||||
public class BlueprintContainer : CompositeDrawable
|
public class BlueprintContainer : CompositeDrawable
|
||||||
{
|
{
|
||||||
private SelectionBlueprintContainer selectionBlueprints;
|
private SelectionBlueprintContainer selectionBlueprints;
|
||||||
private Container<PlacementMask> placementBlueprintContainer;
|
private Container<PlacementBlueprint> placementBlueprintContainer;
|
||||||
private SelectionBox selectionBox;
|
private SelectionBox selectionBox;
|
||||||
|
|
||||||
private IEnumerable<SelectionBlueprint> selections => selectionBlueprints.Children.Where(c => c.IsAlive);
|
private IEnumerable<SelectionBlueprint> selections => selectionBlueprints.Children.Where(c => c.IsAlive);
|
||||||
@ -46,7 +46,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
|
|||||||
dragBox,
|
dragBox,
|
||||||
selectionBox,
|
selectionBox,
|
||||||
selectionBlueprints = new SelectionBlueprintContainer { RelativeSizeAxes = Axes.Both },
|
selectionBlueprints = new SelectionBlueprintContainer { RelativeSizeAxes = Axes.Both },
|
||||||
placementBlueprintContainer = new Container<PlacementMask> { RelativeSizeAxes = Axes.Both },
|
placementBlueprintContainer = new Container<PlacementBlueprint> { RelativeSizeAxes = Axes.Both },
|
||||||
dragBox.CreateProxy()
|
dragBox.CreateProxy()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
public abstract class HitObjectPlacementMaskTestCase : OsuTestCase, IPlacementHandler
|
public abstract class HitObjectPlacementMaskTestCase : OsuTestCase, IPlacementHandler
|
||||||
{
|
{
|
||||||
private readonly Container hitObjectContainer;
|
private readonly Container hitObjectContainer;
|
||||||
private PlacementMask currentMask;
|
private PlacementBlueprint currentBlueprint;
|
||||||
|
|
||||||
protected HitObjectPlacementMaskTestCase()
|
protected HitObjectPlacementMaskTestCase()
|
||||||
{
|
{
|
||||||
@ -32,7 +32,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
Add(currentMask = CreateMask());
|
Add(currentBlueprint = CreateMask());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
@ -51,8 +51,8 @@ namespace osu.Game.Tests.Visual
|
|||||||
{
|
{
|
||||||
hitObjectContainer.Add(CreateHitObject(hitObject));
|
hitObjectContainer.Add(CreateHitObject(hitObject));
|
||||||
|
|
||||||
Remove(currentMask);
|
Remove(currentBlueprint);
|
||||||
Add(currentMask = CreateMask());
|
Add(currentBlueprint = CreateMask());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Delete(HitObject hitObject)
|
public void Delete(HitObject hitObject)
|
||||||
@ -60,6 +60,6 @@ namespace osu.Game.Tests.Visual
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected abstract DrawableHitObject CreateHitObject(HitObject hitObject);
|
protected abstract DrawableHitObject CreateHitObject(HitObject hitObject);
|
||||||
protected abstract PlacementMask CreateMask();
|
protected abstract PlacementBlueprint CreateMask();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user