mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 08:02:55 +08:00
Merge pull request #408 from Jorolf/pluginManager
Disable mousewheel while playing
This commit is contained in:
commit
327300e9a7
@ -27,6 +27,7 @@ namespace osu.Game.Configuration
|
||||
Set(OsuConfig.DimLevel, 30, 0, 100);
|
||||
|
||||
Set(OsuConfig.MouseDisableButtons, false);
|
||||
Set(OsuConfig.MouseDisableWheel, false);
|
||||
|
||||
Set(OsuConfig.SnakingInSliders, true);
|
||||
Set(OsuConfig.SnakingOutSliders, false);
|
||||
@ -99,7 +100,6 @@ namespace osu.Game.Configuration
|
||||
Set(OsuConfig.UsePerBeatmapManiaSpeed, true).Disabled = true;
|
||||
Set(OsuConfig.ManiaSpeedBPMScale, true).Disabled = true;
|
||||
Set(OsuConfig.MenuTip, 0).Disabled = true;
|
||||
Set(OsuConfig.MouseDisableWheel, false).Disabled = true;
|
||||
Set(OsuConfig.MouseSpeed, 1, 0.4, 6).Disabled = true;
|
||||
Set(OsuConfig.Offset, 0, -300, 300).Disabled = true;
|
||||
Set(OsuConfig.ScoreMeterScale, 1, 0.5, 2).Disabled = true;
|
||||
|
@ -24,6 +24,7 @@ using OpenTK.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Framework.Input;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
@ -72,6 +73,8 @@ namespace osu.Game.Screens.Play
|
||||
private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuGameBase game, OsuConfigManager config)
|
||||
{
|
||||
dimLevel = config.GetBindable<int>(OsuConfig.DimLevel);
|
||||
mouseWheelDisabled = config.GetBindable<bool>(OsuConfig.MouseDisableWheel);
|
||||
|
||||
try
|
||||
{
|
||||
if (Beatmap == null)
|
||||
@ -325,5 +328,9 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
Background?.FadeTo((100f - dimLevel) / 100, 800);
|
||||
}
|
||||
|
||||
private Bindable<bool> mouseWheelDisabled;
|
||||
|
||||
protected override bool OnWheel(InputState state) => mouseWheelDisabled.Value && !isPaused;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user