mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 16:37:26 +08:00
Add KeyboardStep values for configuration options
This commit is contained in:
parent
59d908861e
commit
ea2934d92c
@ -20,7 +20,8 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
|||||||
new SettingsSlider<double, OffsetSlider>
|
new SettingsSlider<double, OffsetSlider>
|
||||||
{
|
{
|
||||||
LabelText = "Audio Offset",
|
LabelText = "Audio Offset",
|
||||||
Bindable = config.GetBindable<double>(OsuSetting.AudioOffset)
|
Bindable = config.GetBindable<double>(OsuSetting.AudioOffset),
|
||||||
|
KeyboardStep = 100f
|
||||||
},
|
},
|
||||||
new OsuButton
|
new OsuButton
|
||||||
{
|
{
|
||||||
|
@ -16,9 +16,9 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
|||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new SettingsSlider<double> { LabelText = "Master", Bindable = audio.Volume },
|
new SettingsSlider<double> { LabelText = "Master", Bindable = audio.Volume, KeyboardStep = 0.1f },
|
||||||
new SettingsSlider<double> { LabelText = "Effect", Bindable = audio.VolumeSample },
|
new SettingsSlider<double> { LabelText = "Effect", Bindable = audio.VolumeSample, KeyboardStep = 0.1f },
|
||||||
new SettingsSlider<double> { LabelText = "Music", Bindable = audio.VolumeTrack },
|
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>
|
new SettingsSlider<double>
|
||||||
{
|
{
|
||||||
LabelText = "Background dim",
|
LabelText = "Background dim",
|
||||||
Bindable = config.GetBindable<double>(OsuSetting.DimLevel)
|
Bindable = config.GetBindable<double>(OsuSetting.DimLevel),
|
||||||
|
KeyboardStep = 0.1f
|
||||||
},
|
},
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
|
@ -20,12 +20,14 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
|||||||
new SettingsSlider<double, StarSlider>
|
new SettingsSlider<double, StarSlider>
|
||||||
{
|
{
|
||||||
LabelText = "Display beatmaps from",
|
LabelText = "Display beatmaps from",
|
||||||
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMinimum)
|
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMinimum),
|
||||||
|
KeyboardStep = 1f
|
||||||
},
|
},
|
||||||
new SettingsSlider<double, StarSlider>
|
new SettingsSlider<double, StarSlider>
|
||||||
{
|
{
|
||||||
LabelText = "up to",
|
LabelText = "up to",
|
||||||
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMaximum)
|
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMaximum),
|
||||||
|
KeyboardStep = 1f
|
||||||
},
|
},
|
||||||
new SettingsEnumDropdown<SelectionRandomType>
|
new SettingsEnumDropdown<SelectionRandomType>
|
||||||
{
|
{
|
||||||
|
@ -49,12 +49,14 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
|||||||
new SettingsSlider<double>
|
new SettingsSlider<double>
|
||||||
{
|
{
|
||||||
LabelText = "Horizontal position",
|
LabelText = "Horizontal position",
|
||||||
Bindable = config.GetBindable<double>(FrameworkSetting.LetterboxPositionX)
|
Bindable = config.GetBindable<double>(FrameworkSetting.LetterboxPositionX),
|
||||||
|
KeyboardStep = 0.1f
|
||||||
},
|
},
|
||||||
new SettingsSlider<double>
|
new SettingsSlider<double>
|
||||||
{
|
{
|
||||||
LabelText = "Vertical position",
|
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>
|
new SettingsSlider<double, SizeSlider>
|
||||||
{
|
{
|
||||||
LabelText = "Menu cursor size",
|
LabelText = "Menu cursor size",
|
||||||
Bindable = config.GetBindable<double>(OsuSetting.MenuCursorSize)
|
Bindable = config.GetBindable<double>(OsuSetting.MenuCursorSize),
|
||||||
|
KeyboardStep = 0.1f
|
||||||
},
|
},
|
||||||
new SettingsSlider<double, SizeSlider>
|
new SettingsSlider<double, SizeSlider>
|
||||||
{
|
{
|
||||||
LabelText = "Gameplay cursor size",
|
LabelText = "Gameplay cursor size",
|
||||||
Bindable = config.GetBindable<double>(OsuSetting.GameplayCursorSize)
|
Bindable = config.GetBindable<double>(OsuSetting.GameplayCursorSize),
|
||||||
|
KeyboardStep = 0.1f
|
||||||
},
|
},
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
@ -22,5 +23,15 @@ namespace osu.Game.Overlays.Settings
|
|||||||
Margin = new MarginPadding { Top = 5, Bottom = 5 },
|
Margin = new MarginPadding { Top = 5, Bottom = 5 },
|
||||||
RelativeSizeAxes = Axes.X
|
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>
|
new ReplaySliderBar<double>
|
||||||
{
|
{
|
||||||
LabelText = "Playback speed",
|
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