1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-18 08:32:54 +08:00

Add the ability to move a skin element by 10 pixels when holding shift

This commit is contained in:
Flux 2023-02-03 15:02:59 +01:00
parent 2ba90b5447
commit 3f9cb17161

View File

@ -104,22 +104,24 @@ namespace osu.Game.Overlays.SkinEditor
protected override bool OnKeyDown(KeyDownEvent e) protected override bool OnKeyDown(KeyDownEvent e)
{ {
int delta = e.ShiftPressed ? 10 : 1;
switch (e.Key) switch (e.Key)
{ {
case Key.Left: case Key.Left:
moveSelection(new Vector2(-1, 0)); moveSelection(new Vector2(-delta, 0));
return true; return true;
case Key.Right: case Key.Right:
moveSelection(new Vector2(1, 0)); moveSelection(new Vector2(delta, 0));
return true; return true;
case Key.Up: case Key.Up:
moveSelection(new Vector2(0, -1)); moveSelection(new Vector2(0, -delta));
return true; return true;
case Key.Down: case Key.Down:
moveSelection(new Vector2(0, 1)); moveSelection(new Vector2(0, delta));
return true; return true;
} }