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 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}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user