mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 05:42:56 +08:00
Add the ability to move a skin element by 10 pixels when holding shift
This commit is contained in:
parent
2ba90b5447
commit
3f9cb17161
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user