Move hardcoded production tab keys into yaml.
This commit is contained in:
@@ -68,7 +68,11 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
public readonly int TabWidth = 30;
|
||||
public readonly int ArrowWidth = 20;
|
||||
public Dictionary<string, ProductionTabGroup> Groups;
|
||||
|
||||
public readonly NamedHotkey PreviousProductionTabKey = new NamedHotkey();
|
||||
public readonly NamedHotkey NextProductionTabKey = new NamedHotkey();
|
||||
|
||||
public readonly Dictionary<string, ProductionTabGroup> Groups;
|
||||
|
||||
int contentWidth = 0;
|
||||
float listOffset = 0;
|
||||
@@ -284,18 +288,18 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
return false;
|
||||
|
||||
var hotkey = Hotkey.FromKeyInput(e);
|
||||
|
||||
if (hotkey == Game.Settings.Keys.NextProductionTabKey)
|
||||
{
|
||||
Game.Sound.PlayNotification(world.Map.Rules, null, "Sounds", "ClickSound", null);
|
||||
return SelectNextTab(false);
|
||||
}
|
||||
else if (hotkey == Game.Settings.Keys.PreviousProductionTabKey)
|
||||
if (hotkey == PreviousProductionTabKey.GetValue())
|
||||
{
|
||||
Game.Sound.PlayNotification(world.Map.Rules, null, "Sounds", "ClickSound", null);
|
||||
return SelectNextTab(true);
|
||||
}
|
||||
|
||||
if (hotkey == NextProductionTabKey.GetValue())
|
||||
{
|
||||
Game.Sound.PlayNotification(world.Map.Rules, null, "Sounds", "ClickSound", null);
|
||||
return SelectNextTab(false);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user