1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 09:07:25 +08:00

Merge pull request #1283 from gabixdev/master

Add option to disable cursor rotation.
This commit is contained in:
Dean Herbert 2017-09-22 15:43:09 +08:00 committed by GitHub
commit d82b7575e1
3 changed files with 26 additions and 1 deletions

View File

@ -54,6 +54,8 @@ namespace osu.Game.Configuration
// Graphics
Set(OsuSetting.ShowFpsDisplay, false);
Set(OsuSetting.CursorRotation, true);
Set(OsuSetting.MenuParallax, true);
Set(OsuSetting.SnakingInSliders, true);
@ -96,6 +98,7 @@ namespace osu.Game.Configuration
AudioOffset,
MenuMusic,
MenuVoice,
CursorRotation,
MenuParallax,
BeatmapDetailTab,
Username,

View File

@ -20,13 +20,14 @@ namespace osu.Game.Graphics.Cursor
{
protected override Drawable CreateCursor() => new Cursor();
private Bindable<bool> cursorRotate;
private bool dragging;
private bool startRotation;
protected override bool OnMouseMove(InputState state)
{
if (dragging)
if (cursorRotate && dragging)
{
Debug.Assert(state.Mouse.PositionMouseDown != null);
@ -102,6 +103,12 @@ namespace osu.Game.Graphics.Cursor
ActiveCursor.ScaleTo(0, 500, Easing.In);
}
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
cursorRotate = config.GetBindable<bool>(OsuSetting.CursorRotation);
}
public class Cursor : Container
{
private Container cursorContainer;

View File

@ -1,10 +1,25 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Settings.Sections.Graphics
{
public class DetailSettings : SettingsSubsection
{
protected override string Header => "Detail Settings";
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
Children = new[]
{
new SettingsCheckbox
{
LabelText = "Rotate cursor when dragging",
Bindable = config.GetBindable<bool>(OsuSetting.CursorRotation)
},
};
}
}
}