mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 11:43:22 +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)
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user