mirror of
https://github.com/osukey/osukey.git
synced 2025-05-22 22:17:36 +09:00
Fix editor quick delete being triggerable from left mouse button
Closes https://github.com/ppy/osu/issues/10629.
This commit is contained in:
parent
c8917d1236
commit
a012105dac
@ -303,7 +303,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
{
|
{
|
||||||
if (blueprint.IsHovered)
|
if (blueprint.IsHovered)
|
||||||
{
|
{
|
||||||
selectedPerformed &= SelectionHandler.HandleSelectionRequested(blueprint, e.CurrentState);
|
selectedPerformed &= SelectionHandler.HandleSelectionRequested(blueprint, e);
|
||||||
clickSelectionBegan = true;
|
clickSelectionBegan = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ using osu.Framework.Graphics.Shapes;
|
|||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Framework.Input.States;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Audio;
|
using osu.Game.Audio;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
@ -218,17 +218,17 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
/// Handle a blueprint requesting selection.
|
/// Handle a blueprint requesting selection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="blueprint">The blueprint.</param>
|
/// <param name="blueprint">The blueprint.</param>
|
||||||
/// <param name="state">The input state at the point of selection.</param>
|
/// <param name="e">The mouse event responsible for selection.</param>
|
||||||
/// <returns>Whether a selection was performed.</returns>
|
/// <returns>Whether a selection was performed.</returns>
|
||||||
internal bool HandleSelectionRequested(SelectionBlueprint blueprint, InputState state)
|
internal bool HandleSelectionRequested(SelectionBlueprint blueprint, MouseButtonEvent e)
|
||||||
{
|
{
|
||||||
if (state.Keyboard.ShiftPressed && state.Mouse.IsPressed(MouseButton.Right))
|
if (e.ShiftPressed && e.Button == MouseButton.Right)
|
||||||
{
|
{
|
||||||
handleQuickDeletion(blueprint);
|
handleQuickDeletion(blueprint);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.Keyboard.ControlPressed && state.Mouse.IsPressed(MouseButton.Left))
|
if (e.ControlPressed && e.Button == MouseButton.Left)
|
||||||
blueprint.ToggleSelection();
|
blueprint.ToggleSelection();
|
||||||
else
|
else
|
||||||
ensureSelected(blueprint);
|
ensureSelected(blueprint);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user