mirror of
https://github.com/osukey/osukey.git
synced 2025-05-04 21:27:22 +09:00
Merge branch 'master' into profile
This commit is contained in:
commit
d5dc37ec62
@ -1 +1 @@
|
|||||||
Subproject commit 7131c54ea0a76ea03565ca93680487930c1c158a
|
Subproject commit 2be02764ab5b27c3e85ae4997cdb4215e59a801b
|
@ -7,7 +7,6 @@ using osu.Framework.MathUtils;
|
|||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Graphics.OpenGL;
|
|
||||||
using osu.Framework.Graphics.Shaders;
|
using osu.Framework.Graphics.Shaders;
|
||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
using OpenTK.Graphics.ES30;
|
using OpenTK.Graphics.ES30;
|
||||||
@ -16,6 +15,7 @@ using osu.Framework.Graphics.Primitives;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Graphics.Batches;
|
using osu.Framework.Graphics.Batches;
|
||||||
|
using osu.Framework.Graphics.OpenGL.Vertices;
|
||||||
using osu.Framework.Lists;
|
using osu.Framework.Lists;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.Backgrounds
|
namespace osu.Game.Graphics.Backgrounds
|
||||||
|
@ -8,13 +8,13 @@ using osu.Framework.Graphics.Textures;
|
|||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Graphics.OpenGL;
|
|
||||||
using osu.Framework.Graphics.OpenGL.Buffers;
|
using osu.Framework.Graphics.OpenGL.Buffers;
|
||||||
using OpenTK.Graphics.ES30;
|
using OpenTK.Graphics.ES30;
|
||||||
using osu.Framework.Graphics.Primitives;
|
using osu.Framework.Graphics.Primitives;
|
||||||
using osu.Framework.Graphics.Colour;
|
using osu.Framework.Graphics.Colour;
|
||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using osu.Framework.Graphics.OpenGL.Vertices;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.Cursor
|
namespace osu.Game.Graphics.Cursor
|
||||||
{
|
{
|
||||||
|
@ -77,8 +77,10 @@ namespace osu.Game
|
|||||||
public void ToggleDirect() => direct.ToggleVisibility();
|
public void ToggleDirect() => direct.ToggleVisibility();
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load(FrameworkConfigManager frameworkConfig)
|
||||||
{
|
{
|
||||||
|
this.frameworkConfig = frameworkConfig;
|
||||||
|
|
||||||
if (!Host.IsPrimaryInstance)
|
if (!Host.IsPrimaryInstance)
|
||||||
{
|
{
|
||||||
Logger.Log(@"osu! does not support multiple running instances.", LoggingTarget.Runtime, LogLevel.Error);
|
Logger.Log(@"osu! does not support multiple running instances.", LoggingTarget.Runtime, LogLevel.Error);
|
||||||
@ -259,6 +261,19 @@ namespace osu.Game
|
|||||||
{
|
{
|
||||||
switch (args.Key)
|
switch (args.Key)
|
||||||
{
|
{
|
||||||
|
case Key.R:
|
||||||
|
if (state.Keyboard.AltPressed)
|
||||||
|
{
|
||||||
|
var sensitivity = frameworkConfig.GetBindable<double>(FrameworkSetting.CursorSensitivity);
|
||||||
|
|
||||||
|
sensitivity.Disabled = false;
|
||||||
|
sensitivity.Value = 1;
|
||||||
|
sensitivity.Disabled = true;
|
||||||
|
|
||||||
|
frameworkConfig.Set(FrameworkSetting.ActiveInputHandlers, string.Empty);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case Key.T:
|
case Key.T:
|
||||||
Toolbar.ToggleVisibility();
|
Toolbar.ToggleVisibility();
|
||||||
return true;
|
return true;
|
||||||
@ -284,6 +299,7 @@ namespace osu.Game
|
|||||||
private Container overlayContent;
|
private Container overlayContent;
|
||||||
|
|
||||||
private OsuScreen currentScreen;
|
private OsuScreen currentScreen;
|
||||||
|
private FrameworkConfigManager frameworkConfig;
|
||||||
|
|
||||||
private void screenChanged(Screen newScreen)
|
private void screenChanged(Screen newScreen)
|
||||||
{
|
{
|
||||||
|
@ -125,6 +125,14 @@ namespace osu.Game.Overlays
|
|||||||
trackSetting(frameworkConfig.GetBindable<int>(FrameworkSetting.Width), v => displayResolution());
|
trackSetting(frameworkConfig.GetBindable<int>(FrameworkSetting.Width), v => displayResolution());
|
||||||
trackSetting(frameworkConfig.GetBindable<int>(FrameworkSetting.Height), v => displayResolution());
|
trackSetting(frameworkConfig.GetBindable<int>(FrameworkSetting.Height), v => displayResolution());
|
||||||
|
|
||||||
|
trackSetting(frameworkConfig.GetBindable<double>(FrameworkSetting.CursorSensitivity), v => display(v, "Cursor Sensitivity", v.ToString(@"0.##x"), "Ctrl+Alt+R to reset"));
|
||||||
|
trackSetting(frameworkConfig.GetBindable<string>(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<WindowMode>(FrameworkSetting.WindowMode), v => display(v, "Screen Mode", v.ToString(), "Alt+Enter"));
|
trackSetting(frameworkConfig.GetBindable<WindowMode>(FrameworkSetting.WindowMode), v => display(v, "Screen Mode", v.ToString(), "Alt+Enter"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,9 +21,6 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager osuConfig, FrameworkConfigManager config)
|
private void load(OsuConfigManager osuConfig, FrameworkConfigManager config)
|
||||||
{
|
{
|
||||||
activeInputHandlers = config.GetBindable<string>(FrameworkSetting.ActiveInputHandlers);
|
|
||||||
rawInputToggle.Value = activeInputHandlers.Value.Contains("Raw");
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
@ -62,11 +59,17 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
activeInputHandlers.Value = enabled ?
|
activeInputHandlers.Value = enabled ?
|
||||||
activeInputHandlers.Value.Replace(standard_mouse_handler, raw_mouse_handler) :
|
activeInputHandlers.Value.Replace(standard_mouse_handler, raw_mouse_handler) :
|
||||||
activeInputHandlers.Value.Replace(raw_mouse_handler, standard_mouse_handler);
|
activeInputHandlers.Value.Replace(raw_mouse_handler, standard_mouse_handler);
|
||||||
|
|
||||||
sensitivity.Bindable.Disabled = !enabled;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
rawInputToggle.TriggerChange();
|
activeInputHandlers = config.GetBindable<string>(FrameworkSetting.ActiveInputHandlers);
|
||||||
|
activeInputHandlers.ValueChanged += handlers =>
|
||||||
|
{
|
||||||
|
bool raw = handlers.Contains("Raw");
|
||||||
|
rawInputToggle.Value = raw;
|
||||||
|
sensitivity.Bindable.Disabled = !raw;
|
||||||
|
};
|
||||||
|
|
||||||
|
activeInputHandlers.TriggerChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
private class SensitivitySetting : SettingsSlider<double, SensitivitySlider>
|
private class SensitivitySetting : SettingsSlider<double, SensitivitySlider>
|
||||||
|
@ -43,7 +43,8 @@
|
|||||||
<HintPath>$(SolutionDir)\packages\ppy.OpenTK.2.0.50727.1341\lib\net45\OpenTK.dll</HintPath>
|
<HintPath>$(SolutionDir)\packages\ppy.OpenTK.2.0.50727.1341\lib\net45\OpenTK.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SharpCompress, Version=0.15.2.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL">
|
<Reference Include="SharpCompress, Version=0.15.2.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL">
|
||||||
<HintPath>$(SolutionDir)\packages\sharpcompress.0.15.2\lib\net45\SharpCompress.dll</HintPath>
|
<HintPath Condition="Exists('$(SolutionDir)\packages\sharpcompress.0.15.2')" >$(SolutionDir)\packages\sharpcompress.0.15.2\lib\net45\SharpCompress.dll</HintPath>
|
||||||
|
<HintPath Condition="Exists('$(SolutionDir)\packages\SharpCompress.0.15.2')" >$(SolutionDir)\packages\SharpCompress.0.15.2\lib\net45\SharpCompress.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SQLite.Net, Version=3.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="SQLite.Net, Version=3.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>$(SolutionDir)\packages\SQLite.Net.Core-PCL.3.1.1\lib\portable-win8+net45+wp8+wpa81+MonoAndroid1+MonoTouch1\SQLite.Net.dll</HintPath>
|
<HintPath>$(SolutionDir)\packages\SQLite.Net.Core-PCL.3.1.1\lib\portable-win8+net45+wp8+wpa81+MonoAndroid1+MonoTouch1\SQLite.Net.dll</HintPath>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user