mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
Rename AllowDeselection
to better match use case
This commit is contained in:
parent
a9a5809e94
commit
e4f2e0131c
@ -76,9 +76,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
protected virtual DragBox CreateDragBox(Action<RectangleF> performSelect) => new DragBox(performSelect);
|
protected virtual DragBox CreateDragBox(Action<RectangleF> performSelect) => new DragBox(performSelect);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether this component is in a state where deselection should be allowed. If false, selection will only be added to.
|
/// Whether this component is in a state where items outside a drag selection should be deselected. If false, selection will only be added to.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual bool AllowDeselection => true;
|
protected virtual bool AllowDeselectionDuringDrag => true;
|
||||||
|
|
||||||
protected override bool OnMouseDown(MouseDownEvent e)
|
protected override bool OnMouseDown(MouseDownEvent e)
|
||||||
{
|
{
|
||||||
@ -354,7 +354,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SelectionState.Selected:
|
case SelectionState.Selected:
|
||||||
if (AllowDeselection && !isValidForSelection())
|
if (AllowDeselectionDuringDrag && !isValidForSelection())
|
||||||
blueprint.Deselect();
|
blueprint.Deselect();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
protected override IEnumerable<SelectionBlueprint<HitObject>> SortForMovement(IReadOnlyList<SelectionBlueprint<HitObject>> blueprints)
|
protected override IEnumerable<SelectionBlueprint<HitObject>> SortForMovement(IReadOnlyList<SelectionBlueprint<HitObject>> blueprints)
|
||||||
=> blueprints.OrderBy(b => b.Item.StartTime);
|
=> blueprints.OrderBy(b => b.Item.StartTime);
|
||||||
|
|
||||||
protected override bool AllowDeselection => !EditorClock.IsRunning;
|
protected override bool AllowDeselectionDuringDrag => !EditorClock.IsRunning;
|
||||||
|
|
||||||
protected override bool ApplySnapResult(SelectionBlueprint<HitObject>[] blueprints, SnapResult result)
|
protected override bool ApplySnapResult(SelectionBlueprint<HitObject>[] blueprints, SnapResult result)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user