mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 00:12:59 +08:00
Introduce InputSettings
This commit is contained in:
parent
3c689359af
commit
6676c55fe0
39
osu.Game/Screens/Play/PlayerSettings/InputSettings.cs
Normal file
39
osu.Game/Screens/Play/PlayerSettings/InputSettings.cs
Normal file
@ -0,0 +1,39 @@
|
||||
// Copyright (c) 2007-2018 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.Framework.Graphics;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
namespace osu.Game.Screens.Play.PlayerSettings
|
||||
{
|
||||
public class InputSettings : PlayerSettingsGroup
|
||||
{
|
||||
protected override string Title => "Input settings";
|
||||
|
||||
private readonly PlayerCheckbox mouseWheelCheckbox;
|
||||
private readonly PlayerCheckbox mouseButtonsCheckbox;
|
||||
|
||||
public InputSettings()
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
mouseWheelCheckbox = new PlayerCheckbox
|
||||
{
|
||||
LabelText = "Disable mouse wheel during gameplay"
|
||||
},
|
||||
mouseButtonsCheckbox = new PlayerCheckbox
|
||||
{
|
||||
LabelText = "Disable mouse buttons during gameplay"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
mouseWheelCheckbox.Bindable = config.GetBindable<bool>(OsuSetting.MouseDisableWheel);
|
||||
mouseButtonsCheckbox.Bindable = config.GetBindable<bool>(OsuSetting.MouseDisableButtons);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user