From 25ff4de39ae14b04af8030f3e5ddceda31d00a73 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Thu, 8 Jun 2017 17:57:06 +0900 Subject: [PATCH 1/6] Update with framework changes. --- osu-framework | 2 +- osu.Game/Graphics/Backgrounds/Triangles.cs | 2 +- osu.Game/Graphics/Cursor/CursorTrail.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osu-framework b/osu-framework index 3ad1dd52ae..a6a37ecbd5 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 3ad1dd52ae511b816fb928f70ef811ec605c5c18 +Subproject commit a6a37ecbd5ab04bffdad50995e4670cba76abf61 diff --git a/osu.Game/Graphics/Backgrounds/Triangles.cs b/osu.Game/Graphics/Backgrounds/Triangles.cs index 7a2345a80c..e6a5c5104d 100644 --- a/osu.Game/Graphics/Backgrounds/Triangles.cs +++ b/osu.Game/Graphics/Backgrounds/Triangles.cs @@ -7,7 +7,6 @@ using osu.Framework.MathUtils; using OpenTK; using OpenTK.Graphics; using System; -using osu.Framework.Graphics.OpenGL; using osu.Framework.Graphics.Shaders; using osu.Framework.Graphics.Textures; using OpenTK.Graphics.ES30; @@ -16,6 +15,7 @@ using osu.Framework.Graphics.Primitives; using osu.Framework.Allocation; using System.Collections.Generic; using osu.Framework.Graphics.Batches; +using osu.Framework.Graphics.OpenGL.Vertices; using osu.Framework.Lists; namespace osu.Game.Graphics.Backgrounds diff --git a/osu.Game/Graphics/Cursor/CursorTrail.cs b/osu.Game/Graphics/Cursor/CursorTrail.cs index 11475a0f19..183679fbd3 100644 --- a/osu.Game/Graphics/Cursor/CursorTrail.cs +++ b/osu.Game/Graphics/Cursor/CursorTrail.cs @@ -8,13 +8,13 @@ using osu.Framework.Graphics.Textures; using osu.Framework.Input; using OpenTK; using System; -using osu.Framework.Graphics.OpenGL; using osu.Framework.Graphics.OpenGL.Buffers; using OpenTK.Graphics.ES30; using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Colour; using osu.Framework.Timing; using System.Diagnostics; +using osu.Framework.Graphics.OpenGL.Vertices; namespace osu.Game.Graphics.Cursor { From 028364b2d99939306e69578ddee5a0d80f502fd9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 8 Jun 2017 17:58:28 +0900 Subject: [PATCH 2/6] Add on-screen display support for RawInput and CursorSensitivity Also allows resetting both at once using Ctrl+Alt+R. - Depends on https://github.com/ppy/osu-framework/pull/807 --- osu.Game/OsuGame.cs | 13 ++++++++++++- osu.Game/Overlays/OnScreenDisplay.cs | 8 ++++++++ .../Settings/Sections/Input/MouseSettings.cs | 7 +++---- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 6bcd89b878..dd376b4cff 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -77,8 +77,10 @@ namespace osu.Game public void ToggleDirect() => direct.ToggleVisibility(); [BackgroundDependencyLoader] - private void load() + private void load(FrameworkConfigManager frameworkConfig) { + this.frameworkConfig = frameworkConfig; + if (!Host.IsPrimaryInstance) { Logger.Log(@"osu! does not support multiple running instances.", LoggingTarget.Runtime, LogLevel.Error); @@ -259,6 +261,14 @@ namespace osu.Game { switch (args.Key) { + case Key.R: + if (state.Keyboard.AltPressed) + { + frameworkConfig.Set(FrameworkSetting.ActiveInputHandlers, string.Empty); + frameworkConfig.Set(FrameworkSetting.CursorSensitivity, 1.0); + return true; + } + break; case Key.T: Toolbar.ToggleVisibility(); return true; @@ -284,6 +294,7 @@ namespace osu.Game private Container overlayContent; private OsuScreen currentScreen; + private FrameworkConfigManager frameworkConfig; private void screenChanged(Screen newScreen) { diff --git a/osu.Game/Overlays/OnScreenDisplay.cs b/osu.Game/Overlays/OnScreenDisplay.cs index d262826fd2..cdb60ba704 100644 --- a/osu.Game/Overlays/OnScreenDisplay.cs +++ b/osu.Game/Overlays/OnScreenDisplay.cs @@ -125,6 +125,14 @@ namespace osu.Game.Overlays trackSetting(frameworkConfig.GetBindable(FrameworkSetting.Width), v => displayResolution()); trackSetting(frameworkConfig.GetBindable(FrameworkSetting.Height), v => displayResolution()); + trackSetting(frameworkConfig.GetBindable(FrameworkSetting.CursorSensitivity), v => display(v, "Cursor Sensitivity", v.ToString(@"0.##x"), "Ctrl+Alt+R to reset")); + trackSetting(frameworkConfig.GetBindable(FrameworkSetting.ActiveInputHandlers), + delegate (string v) + { + bool raw = v.Contains("Raw"); + display(raw, "Raw Input", raw ? "enabled" : "disabled", "Ctrl+Alt+R to reset"); + }); + trackSetting(frameworkConfig.GetBindable(FrameworkSetting.WindowMode), v => display(v, "Screen Mode", v.ToString(), "Alt+Enter")); } diff --git a/osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs b/osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs index 311fa072c6..a39073811e 100644 --- a/osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs @@ -21,9 +21,6 @@ namespace osu.Game.Overlays.Settings.Sections.Input [BackgroundDependencyLoader] private void load(OsuConfigManager osuConfig, FrameworkConfigManager config) { - activeInputHandlers = config.GetBindable(FrameworkSetting.ActiveInputHandlers); - rawInputToggle.Value = activeInputHandlers.Value.Contains("Raw"); - Children = new Drawable[] { new SettingsCheckbox @@ -66,7 +63,9 @@ namespace osu.Game.Overlays.Settings.Sections.Input sensitivity.Bindable.Disabled = !enabled; }; - rawInputToggle.TriggerChange(); + activeInputHandlers = config.GetBindable(FrameworkSetting.ActiveInputHandlers); + activeInputHandlers.ValueChanged += handlers => rawInputToggle.Value = handlers.Contains("Raw"); + activeInputHandlers.TriggerChange(); } private class SensitivitySetting : SettingsSlider From 72cbf76a481ecaa52e0390166784fb5d62ca6c17 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 8 Jun 2017 20:41:19 +0900 Subject: [PATCH 3/6] Update framework --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 3ad1dd52ae..4f237ebed8 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 3ad1dd52ae511b816fb928f70ef811ec605c5c18 +Subproject commit 4f237ebed86d518153f9938686211c0fd934e460 From 1b0e96f4115d055e1f923167e07c2232cfe146e3 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 8 Jun 2017 20:57:21 +0900 Subject: [PATCH 4/6] Fix some discrepancies when changing settings --- osu.Game/OsuGame.cs | 7 ++++++- .../Overlays/Settings/Sections/Input/MouseSettings.cs | 10 +++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index dd376b4cff..7e5b913d10 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -264,8 +264,13 @@ namespace osu.Game case Key.R: if (state.Keyboard.AltPressed) { + var sensitivity = frameworkConfig.GetBindable(FrameworkSetting.CursorSensitivity); + + sensitivity.Disabled = false; + sensitivity.Value = 1; + sensitivity.Disabled = true; + frameworkConfig.Set(FrameworkSetting.ActiveInputHandlers, string.Empty); - frameworkConfig.Set(FrameworkSetting.CursorSensitivity, 1.0); return true; } break; diff --git a/osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs b/osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs index a39073811e..5ebac37cc8 100644 --- a/osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs @@ -59,12 +59,16 @@ namespace osu.Game.Overlays.Settings.Sections.Input activeInputHandlers.Value = enabled ? activeInputHandlers.Value.Replace(standard_mouse_handler, raw_mouse_handler) : activeInputHandlers.Value.Replace(raw_mouse_handler, standard_mouse_handler); - - sensitivity.Bindable.Disabled = !enabled; }; activeInputHandlers = config.GetBindable(FrameworkSetting.ActiveInputHandlers); - activeInputHandlers.ValueChanged += handlers => rawInputToggle.Value = handlers.Contains("Raw"); + activeInputHandlers.ValueChanged += handlers => + { + bool raw = handlers.Contains("Raw"); + rawInputToggle.Value = raw; + sensitivity.Bindable.Disabled = !raw; + }; + activeInputHandlers.TriggerChange(); } From 3be4db2e8368ba3891dde6e1f667f6bd8721836d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 8 Jun 2017 21:30:37 +0900 Subject: [PATCH 5/6] Update framework --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 4f237ebed8..9a1de5dc43 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 4f237ebed86d518153f9938686211c0fd934e460 +Subproject commit 9a1de5dc43158db5b4fe24ea74bc3109cb46c05f From e7a732068ceb6e856f171d290c484c8e426523e0 Mon Sep 17 00:00:00 2001 From: "Krzysztof \"Nairaner\" Machura" Date: Fri, 9 Jun 2017 12:03:18 +0200 Subject: [PATCH 6/6] Fix issue where nuget was only sometimes updating modules case-sensitive --- osu.Game/osu.Game.csproj | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index a83945d5db..a299ea3cb2 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -43,7 +43,8 @@ $(SolutionDir)\packages\ppy.OpenTK.2.0.50727.1341\lib\net45\OpenTK.dll - $(SolutionDir)\packages\sharpcompress.0.15.2\lib\net45\SharpCompress.dll + $(SolutionDir)\packages\sharpcompress.0.15.2\lib\net45\SharpCompress.dll + $(SolutionDir)\packages\SharpCompress.0.15.2\lib\net45\SharpCompress.dll $(SolutionDir)\packages\SQLite.Net.Core-PCL.3.1.1\lib\portable-win8+net45+wp8+wpa81+MonoAndroid1+MonoTouch1\SQLite.Net.dll @@ -504,4 +505,4 @@ --> - \ No newline at end of file +