mirror of
https://github.com/osukey/osukey.git
synced 2025-06-23 12:18:03 +09:00
Fix overbearing key down handling
This commit is contained in:
parent
a1fc4def1d
commit
8d2e852ffd
@ -81,25 +81,22 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
|
||||
protected override bool OnKeyDown(KeyDownEvent e)
|
||||
{
|
||||
base.OnKeyDown(e);
|
||||
|
||||
if (cumulativeRotation.Value != null && (e.Key == Key.ShiftLeft || e.Key == Key.ShiftRight))
|
||||
if (IsDragged && (e.Key == Key.ShiftLeft || e.Key == Key.ShiftRight))
|
||||
{
|
||||
applyRotation(shouldSnap: true);
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
return base.OnKeyDown(e);
|
||||
}
|
||||
|
||||
protected override void OnKeyUp(KeyUpEvent e)
|
||||
{
|
||||
base.OnKeyUp(e);
|
||||
|
||||
if (cumulativeRotation.Value != null && (e.Key == Key.ShiftLeft || e.Key == Key.ShiftRight))
|
||||
{
|
||||
if (IsDragged && (e.Key == Key.ShiftLeft || e.Key == Key.ShiftRight))
|
||||
applyRotation(shouldSnap: false);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnDragEnd(DragEndEvent e)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user