mirror of
https://github.com/ppy/osu.git
synced 2025-02-22 16:28:21 +08:00
Fixed the problems that were brought up and deleted the old bind logic
This commit is contained in:
parent
9acff1be0a
commit
c3fb793762
@ -97,7 +97,7 @@ namespace osu.Game.Configuration
|
|||||||
SetDefault(OsuSetting.MenuParallax, true);
|
SetDefault(OsuSetting.MenuParallax, true);
|
||||||
|
|
||||||
// Gameplay
|
// Gameplay
|
||||||
SetDefault(OsuSetting.PositionalHitsoundsLevel, 0.8f, 0, 1);
|
SetDefault(OsuSetting.PositionalHitsoundsLevel, 0.2f, 0, 1);
|
||||||
SetDefault(OsuSetting.DimLevel, 0.8, 0, 1, 0.01);
|
SetDefault(OsuSetting.DimLevel, 0.8, 0, 1, 0.01);
|
||||||
SetDefault(OsuSetting.BlurLevel, 0, 0, 1, 0.01);
|
SetDefault(OsuSetting.BlurLevel, 0, 0, 1, 0.01);
|
||||||
SetDefault(OsuSetting.LightenDuringBreaks, true);
|
SetDefault(OsuSetting.LightenDuringBreaks, true);
|
||||||
@ -109,7 +109,6 @@ namespace osu.Game.Configuration
|
|||||||
SetDefault(OsuSetting.ShowHealthDisplayWhenCantFail, true);
|
SetDefault(OsuSetting.ShowHealthDisplayWhenCantFail, true);
|
||||||
SetDefault(OsuSetting.FadePlayfieldWhenHealthLow, true);
|
SetDefault(OsuSetting.FadePlayfieldWhenHealthLow, true);
|
||||||
SetDefault(OsuSetting.KeyOverlay, false);
|
SetDefault(OsuSetting.KeyOverlay, false);
|
||||||
SetDefault(OsuSetting.PositionalHitSounds, true);
|
|
||||||
SetDefault(OsuSetting.AlwaysPlayFirstComboBreak, true);
|
SetDefault(OsuSetting.AlwaysPlayFirstComboBreak, true);
|
||||||
|
|
||||||
SetDefault(OsuSetting.FloatingComments, false);
|
SetDefault(OsuSetting.FloatingComments, false);
|
||||||
@ -254,7 +253,6 @@ namespace osu.Game.Configuration
|
|||||||
ShowStoryboard,
|
ShowStoryboard,
|
||||||
PositionalHitsoundsLevel,
|
PositionalHitsoundsLevel,
|
||||||
KeyOverlay,
|
KeyOverlay,
|
||||||
PositionalHitSounds,
|
|
||||||
AlwaysPlayFirstComboBreak,
|
AlwaysPlayFirstComboBreak,
|
||||||
FloatingComments,
|
FloatingComments,
|
||||||
HUDVisibilityMode,
|
HUDVisibilityMode,
|
||||||
|
@ -32,7 +32,7 @@ namespace osu.Game.Localisation
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// "Master"
|
/// "Master"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString PositionalLevel => new TranslatableString(getKey(@"positional_hitsound_audio_level"), @"Positional hitsound audio level.");
|
public static LocalisableString PositionalLevel => new TranslatableString(getKey(@"positional_hitsound_audio_level"), @"Positional hitsound audio level");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// "Level"
|
/// "Level"
|
||||||
|
@ -84,11 +84,6 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString AlwaysShowKeyOverlay => new TranslatableString(getKey(@"key_overlay"), @"Always show key overlay");
|
public static LocalisableString AlwaysShowKeyOverlay => new TranslatableString(getKey(@"key_overlay"), @"Always show key overlay");
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "Positional hitsounds"
|
|
||||||
/// </summary>
|
|
||||||
public static LocalisableString PositionalHitsounds => new TranslatableString(getKey(@"positional_hitsounds"), @"Positional hitsounds");
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// "Always play first combo break sound"
|
/// "Always play first combo break sound"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -25,11 +25,6 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
|||||||
positionalHitsoundsLevel = osuConfig.GetBindable<float>(OsuSetting.PositionalHitsoundsLevel);
|
positionalHitsoundsLevel = osuConfig.GetBindable<float>(OsuSetting.PositionalHitsoundsLevel);
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new SettingsCheckbox
|
|
||||||
{
|
|
||||||
LabelText = GameplaySettingsStrings.PositionalHitsounds,
|
|
||||||
Current = config.GetBindable<bool>(OsuSetting.PositionalHitSounds)
|
|
||||||
},
|
|
||||||
positionalHitsoundsSettings = new FillFlowContainer<SettingsSlider<float>>
|
positionalHitsoundsSettings = new FillFlowContainer<SettingsSlider<float>>
|
||||||
{
|
{
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
|
@ -124,10 +124,8 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
|
|
||||||
public readonly Bindable<double> StartTimeBindable = new Bindable<double>();
|
public readonly Bindable<double> StartTimeBindable = new Bindable<double>();
|
||||||
private readonly BindableList<HitSampleInfo> samplesBindable = new BindableList<HitSampleInfo>();
|
private readonly BindableList<HitSampleInfo> samplesBindable = new BindableList<HitSampleInfo>();
|
||||||
private readonly Bindable<bool> userPositionalHitSounds = new Bindable<bool>();
|
|
||||||
private readonly Bindable<float> positionalHitsoundsLevel = new Bindable<float>();
|
|
||||||
|
|
||||||
private readonly Bindable<int> comboIndexBindable = new Bindable<int>();
|
private readonly Bindable<float> positionalHitsoundsLevel = new Bindable<float>(); private readonly Bindable<int> comboIndexBindable = new Bindable<int>();
|
||||||
private readonly Bindable<int> comboIndexWithOffsetsBindable = new Bindable<int>();
|
private readonly Bindable<int> comboIndexWithOffsetsBindable = new Bindable<int>();
|
||||||
|
|
||||||
protected override bool RequiresChildrenUpdate => true;
|
protected override bool RequiresChildrenUpdate => true;
|
||||||
@ -170,7 +168,6 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config, ISkinSource skinSource)
|
private void load(OsuConfigManager config, ISkinSource skinSource)
|
||||||
{
|
{
|
||||||
config.BindWith(OsuSetting.PositionalHitSounds, userPositionalHitSounds);
|
|
||||||
config.BindWith(OsuSetting.PositionalHitsoundsLevel, positionalHitsoundsLevel);
|
config.BindWith(OsuSetting.PositionalHitsoundsLevel, positionalHitsoundsLevel);
|
||||||
|
|
||||||
// Explicit non-virtual function call.
|
// Explicit non-virtual function call.
|
||||||
@ -535,9 +532,11 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
/// <param name="position">The lookup X position. Generally should be <see cref="SamplePlaybackPosition"/>.</param>
|
/// <param name="position">The lookup X position. Generally should be <see cref="SamplePlaybackPosition"/>.</param>
|
||||||
protected double CalculateSamplePlaybackBalance(double position)
|
protected double CalculateSamplePlaybackBalance(double position)
|
||||||
{
|
{
|
||||||
|
double returnedvalue;
|
||||||
float balance_adjust_amount = positionalHitsoundsLevel.Value*2;
|
float balance_adjust_amount = positionalHitsoundsLevel.Value*2;
|
||||||
|
returnedvalue = balance_adjust_amount *(position - 0.5f );
|
||||||
|
|
||||||
return balance_adjust_amount * (true ? position - 0.5f : 0);
|
return returnedvalue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user