mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:28:00 +08:00
Code refactor and name changes
cleaned code up with Jetbrains i hope it suffices
This commit is contained in:
parent
d2e11ea622
commit
fd5af1fbe7
@ -32,7 +32,7 @@ namespace osu.Game.Localisation
|
||||
/// <summary>
|
||||
/// "Master"
|
||||
/// </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"), @"Hitsound stereo separation");
|
||||
|
||||
/// <summary>
|
||||
/// "Level"
|
||||
|
@ -20,11 +20,11 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
private FillFlowContainer<SettingsSlider<float>> positionalHitsoundsSettings;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config,OsuConfigManager osuConfig)
|
||||
private void load(OsuConfigManager config, OsuConfigManager osuConfig)
|
||||
{
|
||||
positionalHitsoundsLevel = osuConfig.GetBindable<float>(OsuSetting.PositionalHitsoundsLevel);
|
||||
Children = new Drawable[]
|
||||
{
|
||||
{
|
||||
positionalHitsoundsSettings = new FillFlowContainer<SettingsSlider<float>>
|
||||
{
|
||||
Direction = FillDirection.Vertical,
|
||||
@ -38,15 +38,15 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
LabelText = AudioSettingsStrings.PositionalLevel,
|
||||
Current = positionalHitsoundsLevel,
|
||||
KeyboardStep = 0.01f,
|
||||
DisplayAsPercentage = true,
|
||||
},
|
||||
DisplayAsPercentage = true
|
||||
}
|
||||
}
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = GameplaySettingsStrings.AlwaysPlayFirstComboBreak,
|
||||
Current = config.GetBindable<bool>(OsuSetting.AlwaysPlayFirstComboBreak)
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Skinning;
|
||||
using osuTK.Graphics;
|
||||
using osu.Game.Overlays.Settings.Sections.Gameplay;
|
||||
|
||||
namespace osu.Game.Rulesets.Objects.Drawables
|
||||
{
|
||||
@ -126,8 +125,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
private readonly BindableList<HitSampleInfo> samplesBindable = new BindableList<HitSampleInfo>();
|
||||
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<float> positionalHitsoundsLevel = new Bindable<float>();
|
||||
private readonly Bindable<int> comboIndexWithOffsetsBindable = new Bindable<int>();
|
||||
|
||||
protected override bool RequiresChildrenUpdate => true;
|
||||
@ -534,10 +532,9 @@ 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)
|
||||
{
|
||||
double returnedvalue;
|
||||
float balance_adjust_amount = positionalHitsoundsLevel.Value*2;
|
||||
returnedvalue = balance_adjust_amount *(position - 0.5f );
|
||||
|
||||
float balanceAdjustAmount = positionalHitsoundsLevel.Value * 2;
|
||||
double returnedvalue = balanceAdjustAmount * (position - 0.5f);
|
||||
|
||||
return returnedvalue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user