mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 01:43:15 +08:00
Add OSD + config value for scroll speed
This commit is contained in:
parent
3a869edf36
commit
a6d8b28221
@ -15,6 +15,7 @@ using osu.Framework.Configuration;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Mania.Objects.Drawables;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.UI.Scrolling;
|
||||
|
||||
@ -161,8 +162,10 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OsuColour colours, OsuConfigManager config)
|
||||
{
|
||||
config.BindWith(OsuSetting.UserScrollSpeed, VisibleTimeRange);
|
||||
|
||||
normalColumnColours = new List<Color4>
|
||||
{
|
||||
colours.RedDark,
|
||||
|
@ -73,6 +73,7 @@ namespace osu.Game.Configuration
|
||||
Set(OsuSetting.FloatingComments, false);
|
||||
|
||||
Set(OsuSetting.ScrollingAlgorithm, ScrollingAlgorithmType.Global);
|
||||
Set(OsuSetting.UserScrollSpeed, 1500.0, 50.0, 10000.0);
|
||||
|
||||
// Update
|
||||
Set(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
|
||||
@ -119,6 +120,7 @@ namespace osu.Game.Configuration
|
||||
ChatDisplayHeight,
|
||||
Version,
|
||||
ShowConvertedBeatmaps,
|
||||
ScrollingAlgorithm
|
||||
ScrollingAlgorithm,
|
||||
UserScrollSpeed
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ using osu.Game.Graphics;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
|
||||
namespace osu.Game.Overlays
|
||||
@ -115,7 +116,7 @@ namespace osu.Game.Overlays
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(FrameworkConfigManager frameworkConfig)
|
||||
private void load(FrameworkConfigManager frameworkConfig, OsuConfigManager osuConfig)
|
||||
{
|
||||
trackSetting(frameworkConfig.GetBindable<FrameSync>(FrameworkSetting.FrameSync), v => display(v, "Frame Limiter", v.GetDescription(), "Ctrl+F7"));
|
||||
trackSetting(frameworkConfig.GetBindable<string>(FrameworkSetting.AudioDevice), v => display(v, "Audio Device", string.IsNullOrEmpty(v) ? "Default" : v, v));
|
||||
@ -135,6 +136,9 @@ namespace osu.Game.Overlays
|
||||
});
|
||||
|
||||
trackSetting(frameworkConfig.GetBindable<WindowMode>(FrameworkSetting.WindowMode), v => display(v, "Screen Mode", v.ToString(), "Alt+Enter"));
|
||||
|
||||
// Todo: This should be part of the ruleset-specific OSD
|
||||
trackSetting(osuConfig.GetBindable<double>(OsuSetting.UserScrollSpeed), v => display(v, "Scroll Speed", $"{v:N0}ms", "Ctrl+(+/-) to change"));
|
||||
}
|
||||
|
||||
private readonly List<IBindable> references = new List<IBindable>();
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics;
|
||||
@ -102,13 +103,15 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
||||
|
||||
if (state.Keyboard.ControlPressed)
|
||||
{
|
||||
var lastValue = Transforms.OfType<TransformVisibleTimeRange>().LastOrDefault()?.EndValue ?? VisibleTimeRange.Value;
|
||||
|
||||
switch (args.Key)
|
||||
{
|
||||
case Key.Minus:
|
||||
transformVisibleTimeRangeTo(VisibleTimeRange + time_span_step, 200, Easing.OutQuint);
|
||||
transformVisibleTimeRangeTo(lastValue + time_span_step, 200, Easing.OutQuint);
|
||||
break;
|
||||
case Key.Plus:
|
||||
transformVisibleTimeRangeTo(VisibleTimeRange - time_span_step, 200, Easing.OutQuint);
|
||||
transformVisibleTimeRangeTo(lastValue - time_span_step, 200, Easing.OutQuint);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user