mirror of
https://github.com/ppy/osu.git
synced 2026-05-24 18:20:12 +08:00
Localize "Effect, Master, Music" in VolumeOverlay (#36594)
This commit is contained in:
committed by
GitHub
Unverified
parent
5231cfa1c7
commit
e77e08c049
@@ -5,6 +5,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Volume
|
||||
@@ -20,7 +21,7 @@ namespace osu.Game.Overlays.Volume
|
||||
[Resolved]
|
||||
private VolumeOverlay volumeOverlay { get; set; } = null!;
|
||||
|
||||
public MasterVolumeMeter(string name, float circleSize, Color4 meterColour)
|
||||
public MasterVolumeMeter(LocalisableString name, float circleSize, Color4 meterColour)
|
||||
: base(name, circleSize, meterColour)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ using osu.Framework.Graphics.Effects;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Graphics;
|
||||
@@ -42,7 +43,7 @@ namespace osu.Game.Overlays.Volume
|
||||
protected readonly float CircleSize;
|
||||
|
||||
private readonly Color4 meterColour;
|
||||
private readonly string name;
|
||||
private readonly LocalisableString name;
|
||||
|
||||
private OsuSpriteText text;
|
||||
private BufferedContainer maxGlow;
|
||||
@@ -75,7 +76,7 @@ namespace osu.Game.Overlays.Volume
|
||||
|
||||
private const float transition_length = 500;
|
||||
|
||||
public VolumeMeter(string name, float circleSize, Color4 meterColour)
|
||||
public VolumeMeter(LocalisableString name, float circleSize, Color4 meterColour)
|
||||
{
|
||||
CircleSize = circleSize;
|
||||
this.meterColour = meterColour;
|
||||
|
||||
@@ -6,6 +6,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Extensions.LocalisationExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@@ -15,6 +16,7 @@ using osu.Framework.Threading;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Overlays.Volume;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
@@ -67,9 +69,9 @@ namespace osu.Game.Overlays
|
||||
Spacing = new Vector2(0, offset),
|
||||
Children = new[]
|
||||
{
|
||||
volumeMeterEffect = new VolumeMeter("EFFECTS", 125, colours.BlueDarker),
|
||||
volumeMeterMaster = new MasterVolumeMeter("MASTER", 150, colours.PinkDarker) { IsMuted = { BindTarget = IsMuted }, },
|
||||
volumeMeterMusic = new VolumeMeter("MUSIC", 125, colours.BlueDarker),
|
||||
volumeMeterEffect = new VolumeMeter(AudioSettingsStrings.EffectVolume.ToUpper(), 125, colours.BlueDarker),
|
||||
volumeMeterMaster = new MasterVolumeMeter(AudioSettingsStrings.MasterVolume.ToUpper(), 150, colours.PinkDarker) { IsMuted = { BindTarget = IsMuted }, },
|
||||
volumeMeterMusic = new VolumeMeter(AudioSettingsStrings.MusicVolume.ToUpper(), 125, colours.BlueDarker),
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user