Extracted RadarUp and RadarDown notifications to RadarWidget.

This commit is contained in:
Andre Mohren
2018-07-22 14:56:00 +02:00
committed by abcdefg30
parent d7f81d4a20
commit a0ad79e555
6 changed files with 12 additions and 1 deletions

View File

@@ -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;
};

View File

@@ -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)
{