Add Unit stance hotkeys, remove Cycle Stance hotkey

This commit is contained in:
rob-v
2017-05-09 10:26:28 +02:00
committed by Oliver Brakmann
parent d080a47cbf
commit ada5b6d0e5
3 changed files with 31 additions and 28 deletions

View File

@@ -519,7 +519,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{ "AttackMoveKey", "Attack Move" },
{ "StopKey", "Stop" },
{ "ScatterKey", "Scatter" },
{ "StanceCycleKey", "Cycle Stance" },
{ "DeployKey", "Deploy" },
{ "GuardKey", "Guard" }
};
@@ -532,6 +531,24 @@ namespace OpenRA.Mods.Common.Widgets.Logic
BindHotkeyPref(kv, ks, unitTemplate, hotkeyList);
}
// Unit stance
{
var hotkeys = new Dictionary<string, string>()
{
{ "StanceHoldFireKey", "Hold fire" },
{ "StanceReturnFireKey", "Return fire" },
{ "StanceDefendKey", "Defend" },
{ "StanceAttackAnythingKey", "Attack anything" }
};
var header = ScrollItemWidget.Setup(hotkeyHeader, returnTrue, doNothing);
header.Get<LabelWidget>("LABEL").GetText = () => "Unit Stance Commands";
hotkeyList.AddChild(header);
foreach (var kv in hotkeys)
BindHotkeyPref(kv, ks, globalTemplate, hotkeyList);
}
// Production
{
var hotkeys = new Dictionary<string, string>()
@@ -582,7 +599,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
};
var header = ScrollItemWidget.Setup(hotkeyHeader, returnTrue, doNothing);
header.Get<LabelWidget>("LABEL").GetText = () => "Developer commands";
header.Get<LabelWidget>("LABEL").GetText = () => "Developer Commands";
hotkeyList.AddChild(header);
foreach (var kv in hotkeys)
@@ -600,7 +617,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
};
var header = ScrollItemWidget.Setup(hotkeyHeader, returnTrue, doNothing);
header.Get<LabelWidget>("LABEL").GetText = () => "Music commands";
header.Get<LabelWidget>("LABEL").GetText = () => "Music Commands";
hotkeyList.AddChild(header);
foreach (var kv in hotkeys)