mirror of
https://github.com/ppy/osu
synced 2024-12-16 20:05:41 +00:00
Merge pull request #1407 from swoolcock/config-slider-keyboardstep
Add KeyboardStep values for configuration options
This commit is contained in:
commit
74d83cba5a
@ -20,7 +20,8 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
new SettingsSlider<double, OffsetSlider>
|
||||
{
|
||||
LabelText = "Audio Offset",
|
||||
Bindable = config.GetBindable<double>(OsuSetting.AudioOffset)
|
||||
Bindable = config.GetBindable<double>(OsuSetting.AudioOffset),
|
||||
KeyboardStep = 100f
|
||||
},
|
||||
new OsuButton
|
||||
{
|
||||
|
@ -16,9 +16,9 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SettingsSlider<double> { LabelText = "Master", Bindable = audio.Volume },
|
||||
new SettingsSlider<double> { LabelText = "Effect", Bindable = audio.VolumeSample },
|
||||
new SettingsSlider<double> { LabelText = "Music", Bindable = audio.VolumeTrack },
|
||||
new SettingsSlider<double> { LabelText = "Master", Bindable = audio.Volume, KeyboardStep = 0.1f },
|
||||
new SettingsSlider<double> { LabelText = "Effect", Bindable = audio.VolumeSample, KeyboardStep = 0.1f },
|
||||
new SettingsSlider<double> { LabelText = "Music", Bindable = audio.VolumeTrack, KeyboardStep = 0.1f },
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,8 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
new SettingsSlider<double>
|
||||
{
|
||||
LabelText = "Background dim",
|
||||
Bindable = config.GetBindable<double>(OsuSetting.DimLevel)
|
||||
Bindable = config.GetBindable<double>(OsuSetting.DimLevel),
|
||||
KeyboardStep = 0.1f
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
|
@ -20,12 +20,14 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
new SettingsSlider<double, StarSlider>
|
||||
{
|
||||
LabelText = "Display beatmaps from",
|
||||
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMinimum)
|
||||
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMinimum),
|
||||
KeyboardStep = 1f
|
||||
},
|
||||
new SettingsSlider<double, StarSlider>
|
||||
{
|
||||
LabelText = "up to",
|
||||
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMaximum)
|
||||
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMaximum),
|
||||
KeyboardStep = 1f
|
||||
},
|
||||
new SettingsEnumDropdown<SelectionRandomType>
|
||||
{
|
||||
|
@ -49,12 +49,14 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
new SettingsSlider<double>
|
||||
{
|
||||
LabelText = "Horizontal position",
|
||||
Bindable = config.GetBindable<double>(FrameworkSetting.LetterboxPositionX)
|
||||
Bindable = config.GetBindable<double>(FrameworkSetting.LetterboxPositionX),
|
||||
KeyboardStep = 0.1f
|
||||
},
|
||||
new SettingsSlider<double>
|
||||
{
|
||||
LabelText = "Vertical position",
|
||||
Bindable = config.GetBindable<double>(FrameworkSetting.LetterboxPositionY)
|
||||
Bindable = config.GetBindable<double>(FrameworkSetting.LetterboxPositionY),
|
||||
KeyboardStep = 0.1f
|
||||
},
|
||||
}
|
||||
},
|
||||
|
@ -24,12 +24,14 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
new SettingsSlider<double, SizeSlider>
|
||||
{
|
||||
LabelText = "Menu cursor size",
|
||||
Bindable = config.GetBindable<double>(OsuSetting.MenuCursorSize)
|
||||
Bindable = config.GetBindable<double>(OsuSetting.MenuCursorSize),
|
||||
KeyboardStep = 0.1f
|
||||
},
|
||||
new SettingsSlider<double, SizeSlider>
|
||||
{
|
||||
LabelText = "Gameplay cursor size",
|
||||
Bindable = config.GetBindable<double>(OsuSetting.GameplayCursorSize)
|
||||
Bindable = config.GetBindable<double>(OsuSetting.GameplayCursorSize),
|
||||
KeyboardStep = 0.1f
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
@ -22,5 +23,15 @@ namespace osu.Game.Overlays.Settings
|
||||
Margin = new MarginPadding { Top = 5, Bottom = 5 },
|
||||
RelativeSizeAxes = Axes.X
|
||||
};
|
||||
|
||||
public float KeyboardStep;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
var slider = Control as U;
|
||||
if (slider != null)
|
||||
slider.KeyboardStep = KeyboardStep;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,8 @@ namespace osu.Game.Screens.Play.ReplaySettings
|
||||
new ReplaySliderBar<double>
|
||||
{
|
||||
LabelText = "Playback speed",
|
||||
Bindable = config.GetBindable<double>(OsuSetting.PlaybackSpeed)
|
||||
Bindable = config.GetBindable<double>(OsuSetting.PlaybackSpeed),
|
||||
KeyboardStep = 0.5f
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user