Merge pull request #6321 from Mailaender/less-nervous-clicksounds

Fixed double click sound on Tiberian Dawn production tabs
This commit is contained in:
Paul Chote
2014-08-27 18:45:51 +12:00
4 changed files with 10 additions and 4 deletions

View File

@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
if (tabs.QueueGroup == button.ProductionGroup) if (tabs.QueueGroup == button.ProductionGroup)
tabs.SelectNextTab(reverse); tabs.SelectNextTab(reverse);
else else
tabs.QueueGroup = button.ProductionGroup; tabs.QueueGroup = button.ProductionGroup;
}; };
button.IsDisabled = () => tabs.Groups[button.ProductionGroup].Tabs.Count == 0; button.IsDisabled = () => tabs.Groups[button.ProductionGroup].Tabs.Count == 0;

View File

@@ -97,8 +97,6 @@ namespace OpenRA.Mods.RA.Widgets
if (queueGroup == null) if (queueGroup == null)
return true; return true;
Sound.PlayNotification(world.Map.Rules, null, "Sounds", "ClickSound", null);
// Prioritize alerted queues // Prioritize alerted queues
var queues = Groups[queueGroup].Tabs.Select(t => t.Queue) var queues = Groups[queueGroup].Tabs.Select(t => t.Queue)
.OrderByDescending(q => q.CurrentDone ? 1 : 0) .OrderByDescending(q => q.CurrentDone ? 1 : 0)
@@ -281,9 +279,15 @@ namespace OpenRA.Mods.RA.Widgets
var hotkey = Hotkey.FromKeyInput(e); var hotkey = Hotkey.FromKeyInput(e);
if (hotkey == Game.Settings.Keys.NextProductionTabKey) if (hotkey == Game.Settings.Keys.NextProductionTabKey)
{
Sound.PlayNotification(world.Map.Rules, null, "Sounds", "ClickSound", null);
return SelectNextTab(false); return SelectNextTab(false);
}
else if (hotkey == Game.Settings.Keys.PreviousProductionTabKey) else if (hotkey == Game.Settings.Keys.PreviousProductionTabKey)
{
Sound.PlayNotification(world.Map.Rules, null, "Sounds", "ClickSound", null);
return SelectNextTab(true); return SelectNextTab(true);
}
return false; return false;
} }

View File

@@ -227,6 +227,8 @@ namespace OpenRA.Mods.RA.Widgets
world.Selection.Combine(world, new Actor[] { next }, false, true); world.Selection.Combine(world, new Actor[] { next }, false, true);
Sound.PlayNotification(world.Map.Rules, null, "Sounds", "ClickSound", null);
return ToSelection(); return ToSelection();
} }

View File

@@ -1,5 +1,5 @@
Container@MISSION_OBJECTIVES: Container@MISSION_OBJECTIVES:
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
Width: PARENT_RIGHT Width: PARENT_RIGHT
Logic: GameInfoObjectivesLogic Logic: GameInfoObjectivesLogic
Children: Children: