ClickSound and ClickDisabledSound and ChatLine are optional ui sounds.
This commit is contained in:
@@ -43,6 +43,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
readonly World world;
|
||||
readonly WorldRenderer worldRenderer;
|
||||
|
||||
readonly string clickSound = ChromeMetrics.Get<string>("ClickSound");
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public ObserverStatsLogic(World world, ModData modData, WorldRenderer worldRenderer, Widget widget,
|
||||
Action onExit, ObserverStatsPanel activePanel, Dictionary<string, MiniYaml> logicArgs)
|
||||
@@ -128,7 +130,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
if (statsHotkeys[i].IsActivatedBy(e))
|
||||
{
|
||||
Game.Sound.PlayNotification(modData.DefaultRules, null, "Sounds", "ClickSound", null);
|
||||
Game.Sound.PlayNotification(modData.DefaultRules, null, "Sounds", clickSound, null);
|
||||
statsDropDownOptions[i].OnClick();
|
||||
return true;
|
||||
}
|
||||
@@ -137,6 +139,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
if (logicArgs.TryGetValue("ClickSound", out yaml))
|
||||
clickSound = yaml.Value;
|
||||
}
|
||||
|
||||
void ClearStats()
|
||||
|
||||
Reference in New Issue
Block a user