Merge branch 'master' into master

This commit is contained in:
파링
2022-01-06 21:12:45 +09:00
committed by GitHub
39 changed files with 832 additions and 232 deletions

View File

@ -105,7 +105,6 @@ namespace osu.Game.Rulesets.Edit
new Container
{
Name = "Content",
Padding = new MarginPadding { Left = toolbar_width },
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{

View File

@ -123,9 +123,9 @@ namespace osu.Game.Rulesets.Objects.Drawables
public readonly Bindable<double> StartTimeBindable = new Bindable<double>();
private readonly BindableList<HitSampleInfo> samplesBindable = new BindableList<HitSampleInfo>();
private readonly Bindable<bool> userPositionalHitSounds = new Bindable<bool>();
private readonly Bindable<int> comboIndexBindable = new Bindable<int>();
private readonly Bindable<float> positionalHitsoundsLevel = new Bindable<float>();
private readonly Bindable<int> comboIndexWithOffsetsBindable = new Bindable<int>();
protected override bool RequiresChildrenUpdate => true;
@ -168,7 +168,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
[BackgroundDependencyLoader]
private void load(OsuConfigManager config, ISkinSource skinSource)
{
config.BindWith(OsuSetting.PositionalHitSounds, userPositionalHitSounds);
config.BindWith(OsuSetting.PositionalHitsoundsLevel, positionalHitsoundsLevel);
// Explicit non-virtual function call.
base.AddInternal(Samples = new PausableSkinnableSound());
@ -532,9 +532,10 @@ namespace osu.Game.Rulesets.Objects.Drawables
/// <param name="position">The lookup X position. Generally should be <see cref="SamplePlaybackPosition"/>.</param>
protected double CalculateSamplePlaybackBalance(double position)
{
const float balance_adjust_amount = 0.4f;
float balanceAdjustAmount = positionalHitsoundsLevel.Value * 2;
double returnedvalue = balanceAdjustAmount * (position - 0.5f);
return balance_adjust_amount * (userPositionalHitSounds.Value ? position - 0.5f : 0);
return returnedvalue;
}
/// <summary>