mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 14:32:55 +08:00
Merge pull request #2389 from UselessToucan/ignored_input_handler
Fix new input handlers not being enabled by default
This commit is contained in:
commit
f59eef072d
@ -1 +1 @@
|
||||
Subproject commit 02d7a0fa4798d197cd08570ee48951edbb7c7860
|
||||
Subproject commit eb6362eaf1317b0fa27b2c9e559bd9a0f1ce357c
|
@ -439,7 +439,7 @@ namespace osu.Game
|
||||
sensitivity.Value = 1;
|
||||
sensitivity.Disabled = true;
|
||||
|
||||
frameworkConfig.Set(FrameworkSetting.ActiveInputHandlers, string.Empty);
|
||||
frameworkConfig.Set(FrameworkSetting.IgnoredInputHandlers, string.Empty);
|
||||
frameworkConfig.GetBindable<ConfineMouseMode>(FrameworkSetting.ConfineMouseMode).SetDefault();
|
||||
return true;
|
||||
case GlobalAction.ToggleToolbar:
|
||||
|
@ -15,7 +15,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
protected override string Header => "Mouse";
|
||||
|
||||
private readonly BindableBool rawInputToggle = new BindableBool();
|
||||
private Bindable<string> activeInputHandlers;
|
||||
private Bindable<string> ignoredInputHandler;
|
||||
private SensitivitySetting sensitivity;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
@ -61,20 +61,18 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
const string raw_mouse_handler = @"OpenTKRawMouseHandler";
|
||||
const string standard_mouse_handler = @"OpenTKMouseHandler";
|
||||
|
||||
activeInputHandlers.Value = enabled ?
|
||||
activeInputHandlers.Value.Replace(standard_mouse_handler, raw_mouse_handler) :
|
||||
activeInputHandlers.Value.Replace(raw_mouse_handler, standard_mouse_handler);
|
||||
ignoredInputHandler.Value = enabled ? standard_mouse_handler : raw_mouse_handler;
|
||||
};
|
||||
|
||||
activeInputHandlers = config.GetBindable<string>(FrameworkSetting.ActiveInputHandlers);
|
||||
activeInputHandlers.ValueChanged += handlers =>
|
||||
ignoredInputHandler = config.GetBindable<string>(FrameworkSetting.IgnoredInputHandlers);
|
||||
ignoredInputHandler.ValueChanged += handler =>
|
||||
{
|
||||
bool raw = handlers.Contains("Raw");
|
||||
bool raw = !handler.Contains("Raw");
|
||||
rawInputToggle.Value = raw;
|
||||
sensitivity.Bindable.Disabled = !raw;
|
||||
};
|
||||
|
||||
activeInputHandlers.TriggerChange();
|
||||
ignoredInputHandler.TriggerChange();
|
||||
}
|
||||
|
||||
private class SensitivitySetting : SettingsSlider<double, SensitivitySlider>
|
||||
|
Loading…
Reference in New Issue
Block a user