From 6676c55fe05f0f413b95740381f35738e13adfcd Mon Sep 17 00:00:00 2001 From: Roman Kapustin Date: Wed, 9 May 2018 17:22:37 +0300 Subject: [PATCH] Introduce InputSettings --- .../Play/PlayerSettings/InputSettings.cs | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 osu.Game/Screens/Play/PlayerSettings/InputSettings.cs diff --git a/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs b/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs new file mode 100644 index 0000000000..f9dda01c8c --- /dev/null +++ b/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs @@ -0,0 +1,39 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// 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(OsuSetting.MouseDisableWheel); + mouseButtonsCheckbox.Bindable = config.GetBindable(OsuSetting.MouseDisableButtons); + } + } +}