mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:33:20 +08:00
Move CanRotatePlayfieldOrigin bindable to generic rotation handler
This commit is contained in:
parent
2fa52de87a
commit
d5b70ed09a
@ -101,10 +101,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
|
||||
RightToolbox.AddRange(new EditorToolboxGroup[]
|
||||
{
|
||||
new TransformToolboxGroup
|
||||
{
|
||||
RotationHandler = (OsuSelectionRotationHandler)BlueprintContainer.SelectionHandler.RotationHandler,
|
||||
},
|
||||
new TransformToolboxGroup { RotationHandler = BlueprintContainer.SelectionHandler.RotationHandler, },
|
||||
FreehandlSliderToolboxGroup
|
||||
}
|
||||
);
|
||||
|
@ -164,7 +164,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
if ((reference & Anchor.y0) > 0) scale.Y = -scale.Y;
|
||||
}
|
||||
|
||||
public override OsuSelectionRotationHandler CreateRotationHandler() => new OsuSelectionRotationHandler();
|
||||
public override SelectionRotationHandler CreateRotationHandler() => new OsuSelectionRotationHandler();
|
||||
|
||||
private void scaleSlider(Slider slider, Vector2 scale)
|
||||
{
|
||||
|
@ -19,8 +19,6 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
{
|
||||
public partial class OsuSelectionRotationHandler : SelectionRotationHandler
|
||||
{
|
||||
public BindableBool CanRotatePlayfieldOrigin { get; private set; } = new BindableBool();
|
||||
|
||||
[Resolved]
|
||||
private IEditorChangeHandler? changeHandler { get; set; }
|
||||
|
||||
|
@ -11,6 +11,7 @@ using osu.Framework.Input.Events;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osu.Game.Rulesets.Edit;
|
||||
using osu.Game.Screens.Edit.Components;
|
||||
using osu.Game.Screens.Edit.Compose.Components;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Edit
|
||||
@ -21,7 +22,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
|
||||
private EditorToolButton rotateButton = null!;
|
||||
|
||||
public OsuSelectionRotationHandler RotationHandler { get; init; } = null!;
|
||||
public SelectionRotationHandler RotationHandler { get; init; } = null!;
|
||||
|
||||
public TransformToolboxGroup()
|
||||
: base("transform")
|
||||
|
@ -14,10 +14,14 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether rotation anchored by the selection origin can currently be performed.
|
||||
/// This is in constrast to rotation anchored by the entire field.
|
||||
/// </summary>
|
||||
public Bindable<bool> CanRotateSelectionOrigin { get; private set; } = new BindableBool();
|
||||
|
||||
/// <summary>
|
||||
/// Whether rotation anchored by the center of the playfield can currently be performed.
|
||||
/// </summary>
|
||||
public Bindable<bool> CanRotatePlayfieldOrigin { get; private set; } = new BindableBool();
|
||||
|
||||
/// <summary>
|
||||
/// Performs a single, instant, atomic rotation operation.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user