Allow the control group modifier key to be customized.

This commit is contained in:
Paul Chote
2011-03-18 16:26:00 +13:00
parent 6ba6940aad
commit 08158a6929
2 changed files with 9 additions and 3 deletions

View File

@@ -82,6 +82,11 @@ namespace OpenRA.GameRules
public int SheetSize = 2048; public int SheetSize = 2048;
} }
public class KeyboardSettings
{
public Modifiers ControlGroupModifier = Modifiers.Ctrl;
}
public class Settings public class Settings
{ {
string SettingsFile; string SettingsFile;
@@ -92,7 +97,7 @@ namespace OpenRA.GameRules
public GraphicSettings Graphics = new GraphicSettings(); public GraphicSettings Graphics = new GraphicSettings();
public ServerSettings Server = new ServerSettings(); public ServerSettings Server = new ServerSettings();
public DebugSettings Debug = new DebugSettings(); public DebugSettings Debug = new DebugSettings();
public KeyboardSettings Keyboard = new KeyboardSettings();
public Dictionary<string, object> Sections; public Dictionary<string, object> Sections;
public Settings(string file, Arguments args) public Settings(string file, Arguments args)
{ {
@@ -104,7 +109,8 @@ namespace OpenRA.GameRules
{"Sound", Sound}, {"Sound", Sound},
{"Graphics", Graphics}, {"Graphics", Graphics},
{"Server", Server}, {"Server", Server},
{"Debug", Debug} {"Debug", Debug},
{"Keyboard",Keyboard}
}; };

View File

@@ -66,7 +66,7 @@ namespace OpenRA
public void DoControlGroup(World world, int group, Modifiers mods) public void DoControlGroup(World world, int group, Modifiers mods)
{ {
if (mods.HasModifier(Modifiers.Ctrl)) if (mods.HasModifier(Game.Settings.Keyboard.ControlGroupModifier))
{ {
if (actors.Count == 0) if (actors.Count == 0)
return; return;