1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 17:27:24 +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)
{
int delta = e.ShiftPressed ? 10 : 1;
switch (e.Key)
{
case Key.Left:
moveSelection(new Vector2(-1, 0));
moveSelection(new Vector2(-delta, 0));
return true;
case Key.Right:
moveSelection(new Vector2(1, 0));
moveSelection(new Vector2(delta, 0));
return true;
case Key.Up:
moveSelection(new Vector2(0, -1));
moveSelection(new Vector2(0, -delta));
return true;
case Key.Down:
moveSelection(new Vector2(0, 1));
moveSelection(new Vector2(0, delta));
return true;
}