Allow the control group modifier key to be customized.
This commit is contained in:
@@ -82,6 +82,11 @@ namespace OpenRA.GameRules
|
||||
public int SheetSize = 2048;
|
||||
}
|
||||
|
||||
public class KeyboardSettings
|
||||
{
|
||||
public Modifiers ControlGroupModifier = Modifiers.Ctrl;
|
||||
}
|
||||
|
||||
public class Settings
|
||||
{
|
||||
string SettingsFile;
|
||||
@@ -92,7 +97,7 @@ namespace OpenRA.GameRules
|
||||
public GraphicSettings Graphics = new GraphicSettings();
|
||||
public ServerSettings Server = new ServerSettings();
|
||||
public DebugSettings Debug = new DebugSettings();
|
||||
|
||||
public KeyboardSettings Keyboard = new KeyboardSettings();
|
||||
public Dictionary<string, object> Sections;
|
||||
public Settings(string file, Arguments args)
|
||||
{
|
||||
@@ -104,7 +109,8 @@ namespace OpenRA.GameRules
|
||||
{"Sound", Sound},
|
||||
{"Graphics", Graphics},
|
||||
{"Server", Server},
|
||||
{"Debug", Debug}
|
||||
{"Debug", Debug},
|
||||
{"Keyboard",Keyboard}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace OpenRA
|
||||
|
||||
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)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user