mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Add AudioSettingsStrings
This commit is contained in:
@ -8,12 +8,13 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
{
|
||||
public class AudioDevicesSettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Devices";
|
||||
protected override LocalisableString Header => AudioSettingsStrings.AudioDevicesHeader;
|
||||
|
||||
[Resolved]
|
||||
private AudioManager audio { get; set; }
|
||||
@ -78,7 +79,7 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
private class AudioDeviceDropdownControl : DropdownControl
|
||||
{
|
||||
protected override LocalisableString GenerateItemText(string item)
|
||||
=> string.IsNullOrEmpty(item) ? "Default" : base.GenerateItemText(item);
|
||||
=> string.IsNullOrEmpty(item) ? CommonStrings.Default : base.GenerateItemText(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,12 +6,13 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
{
|
||||
public class OffsetSettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Offset Adjustment";
|
||||
protected override LocalisableString Header => AudioSettingsStrings.OffsetHeader;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
@ -20,13 +21,13 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
{
|
||||
new SettingsSlider<double, OffsetSlider>
|
||||
{
|
||||
LabelText = "Audio offset",
|
||||
LabelText = AudioSettingsStrings.AudioOffset,
|
||||
Current = config.GetBindable<double>(OsuSetting.AudioOffset),
|
||||
KeyboardStep = 1f
|
||||
},
|
||||
new SettingsButton
|
||||
{
|
||||
Text = "Offset wizard"
|
||||
Text = AudioSettingsStrings.OffsetWizard
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -6,12 +6,13 @@ using osu.Framework.Audio;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
{
|
||||
public class VolumeSettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Volume";
|
||||
protected override LocalisableString Header => AudioSettingsStrings.VolumeHeader;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio, OsuConfigManager config)
|
||||
@ -20,28 +21,28 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
{
|
||||
new SettingsSlider<double>
|
||||
{
|
||||
LabelText = "Master",
|
||||
LabelText = AudioSettingsStrings.MasterVolume,
|
||||
Current = audio.Volume,
|
||||
KeyboardStep = 0.01f,
|
||||
DisplayAsPercentage = true
|
||||
},
|
||||
new SettingsSlider<double>
|
||||
{
|
||||
LabelText = "Master (window inactive)",
|
||||
LabelText = AudioSettingsStrings.MasterVolumeInactive,
|
||||
Current = config.GetBindable<double>(OsuSetting.VolumeInactive),
|
||||
KeyboardStep = 0.01f,
|
||||
DisplayAsPercentage = true
|
||||
},
|
||||
new SettingsSlider<double>
|
||||
{
|
||||
LabelText = "Effect",
|
||||
LabelText = AudioSettingsStrings.EffectVolume,
|
||||
Current = audio.VolumeSample,
|
||||
KeyboardStep = 0.01f,
|
||||
DisplayAsPercentage = true
|
||||
},
|
||||
new SettingsSlider<double>
|
||||
{
|
||||
LabelText = "Music",
|
||||
LabelText = AudioSettingsStrings.MusicVolume,
|
||||
Current = audio.VolumeTrack,
|
||||
KeyboardStep = 0.01f,
|
||||
DisplayAsPercentage = true
|
||||
|
Reference in New Issue
Block a user