mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:20:04 +08:00
Change distance spacing keybind to Ctrl+Alt
This commit is contained in:
parent
0738cd028f
commit
66c730c382
@ -12,7 +12,6 @@ using osu.Game.Overlays.Settings.Sections;
|
||||
using osu.Game.Rulesets.Edit;
|
||||
using osu.Game.Screens.Edit;
|
||||
using osuTK;
|
||||
using osuTK.Input;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Edit
|
||||
{
|
||||
@ -74,7 +73,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
|
||||
protected override bool OnKeyDown(KeyDownEvent e)
|
||||
{
|
||||
if (e.AltPressed && e.Key == Key.D && !e.Repeat)
|
||||
if (e.ControlPressed && e.AltPressed && !e.Repeat)
|
||||
{
|
||||
expandingContainer.Expanded.Value = true;
|
||||
distanceSpacingScrollActive = true;
|
||||
@ -86,7 +85,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
|
||||
protected override void OnKeyUp(KeyUpEvent e)
|
||||
{
|
||||
if (distanceSpacingScrollActive && (!e.AltPressed || e.Key == Key.D))
|
||||
if (distanceSpacingScrollActive && (!e.AltPressed || !e.ControlPressed))
|
||||
{
|
||||
expandingContainer.Expanded.Value = false;
|
||||
distanceSpacingScrollActive = false;
|
||||
|
@ -95,14 +95,14 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
|
||||
AddStep("retrieve original spacing", () => originalSpacing = (float)editorBeatmap.BeatmapInfo.DistanceSpacing);
|
||||
|
||||
AddStep("hold ctrl", () => InputManager.PressKey(Key.LControl));
|
||||
AddStep("hold alt", () => InputManager.PressKey(Key.LAlt));
|
||||
AddStep("hold D", () => InputManager.PressKey(Key.D));
|
||||
|
||||
AddStep("scroll mouse 5 steps", () => InputManager.ScrollVerticalBy(5));
|
||||
AddAssert("distance spacing increased by 0.5", () => Precision.AlmostEquals(editorBeatmap.BeatmapInfo.DistanceSpacing, originalSpacing + 0.5f));
|
||||
|
||||
AddStep("release alt", () => InputManager.ReleaseKey(Key.LAlt));
|
||||
AddStep("release D", () => InputManager.ReleaseKey(Key.D));
|
||||
AddStep("release ctrl", () => InputManager.ReleaseKey(Key.LControl));
|
||||
}
|
||||
|
||||
public class EditorBeatmapContainer : Container
|
||||
|
Loading…
Reference in New Issue
Block a user