Extracted RadarUp and RadarDown notifications to RadarWidget.
This commit is contained in:
@@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
.Any(a => a.Owner == world.LocalPlayer);
|
||||
|
||||
if (radarEnabled != cachedRadarEnabled)
|
||||
Game.Sound.PlayNotification(world.Map.Rules, null, "Sounds", radarEnabled ? "RadarUp" : "RadarDown", null);
|
||||
Game.Sound.PlayNotification(world.Map.Rules, null, "Sounds", radarEnabled ? radar.SoundUp : radar.SoundDown, null);
|
||||
cachedRadarEnabled = radarEnabled;
|
||||
};
|
||||
|
||||
|
||||
@@ -59,6 +59,9 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
Sprite shroudSprite;
|
||||
Shroud renderShroud;
|
||||
|
||||
public string SoundUp { get; private set; }
|
||||
public string SoundDown { get; private set; }
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public RadarWidget(World world, WorldRenderer worldRenderer)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user