diff --git a/OpenRA.Game/GameRules/Settings.cs b/OpenRA.Game/GameRules/Settings.cs index d8a20e585c..a926542694 100755 --- a/OpenRA.Game/GameRules/Settings.cs +++ b/OpenRA.Game/GameRules/Settings.cs @@ -101,12 +101,7 @@ namespace OpenRA.GameRules public int Timestep = 40; public int SheetSize = 2048; } - - public class KeyboardSettings - { - public Modifiers ControlGroupModifier = Modifiers.Ctrl; - } - + public class Settings { string SettingsFile; @@ -117,7 +112,6 @@ 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 Sections; public Settings(string file, Arguments args) { @@ -130,7 +124,6 @@ namespace OpenRA.GameRules {"Graphics", Graphics}, {"Server", Server}, {"Debug", Debug}, - {"Keyboard",Keyboard} }; diff --git a/OpenRA.Game/Selection.cs b/OpenRA.Game/Selection.cs index 4ace12b9a3..1c39124954 100644 --- a/OpenRA.Game/Selection.cs +++ b/OpenRA.Game/Selection.cs @@ -66,7 +66,8 @@ namespace OpenRA public void DoControlGroup(World world, int group, Modifiers mods) { - if (mods.HasModifier(Game.Settings.Keyboard.ControlGroupModifier)) + var addModifier = Platform.CurrentPlatform == PlatformType.OSX ? Modifiers.Meta : Modifiers.Ctrl; + if (mods.HasModifier(addModifier)) { if (actors.Count == 0) return; diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncSettingsLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncSettingsLogic.cs index 93f25dc530..7b44eb98df 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncSettingsLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncSettingsLogic.cs @@ -51,7 +51,6 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic var debugSettings = Game.Settings.Debug; var graphicsSettings = Game.Settings.Graphics; var soundSettings = Game.Settings.Sound; - var keyboardSettings = Game.Settings.Keyboard; // Player profile var nameTextfield = generalPane.GetWidget("NAME_TEXTFIELD"); @@ -136,11 +135,6 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic teamchatCheckbox.IsChecked = () => gameSettings.TeamChatToggle; teamchatCheckbox.OnClick = () => gameSettings.TeamChatToggle ^= true; - var groupModifierDropdown = inputPane.GetWidget("GROUPADD_MODIFIER"); - groupModifierDropdown.OnMouseDown = _ => ShowGroupModifierDropdown(groupModifierDropdown, keyboardSettings); - groupModifierDropdown.GetText = () => keyboardSettings.ControlGroupModifier.ToString(); - - panel.GetWidget("BACK_BUTTON").OnClick = () => { playerSettings.Name = nameTextfield.Text; @@ -178,30 +172,6 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic return true; } - bool ShowGroupModifierDropdown(DropDownButtonWidget dropdown, KeyboardSettings s) - { - var options = new Dictionary() - { - { "Ctrl", Modifiers.Ctrl }, - { "Alt", Modifiers.Alt }, - { "Shift", Modifiers.Shift }, - // TODO: Display this as Cmd on osx once we have platform detection - { "Meta", Modifiers.Meta } - }; - - Func setupItem = (o, itemTemplate) => - { - var item = ScrollItemWidget.Setup(itemTemplate, - () => s.ControlGroupModifier == options[o], - () => s.ControlGroupModifier = options[o]); - item.GetWidget("LABEL").GetText = () => o; - return item; - }; - - dropdown.ShowDropDown("LABEL_DROPDOWN_TEMPLATE", 500, options.Keys.ToList(), setupItem); - return true; - } - bool ShowWindowModeDropdown(DropDownButtonWidget dropdown, GraphicSettings s) { var options = new Dictionary() diff --git a/mods/cnc/chrome/preferences.yaml b/mods/cnc/chrome/preferences.yaml index c2caac9c8b..b8815c6da5 100644 --- a/mods/cnc/chrome/preferences.yaml +++ b/mods/cnc/chrome/preferences.yaml @@ -295,21 +295,6 @@ Container@SETTINGS_PANEL: Height:20 Font:Regular Text:Shift-Enter Toggles Team Chat - Label@GROUP_MODIFIER_LABEL: - X:375 - Y:65 - Width:160 - Height:20 - Font:Regular - Text:Group Addition Modifier: - Align:Right - DropDownButton@GROUPADD_MODIFIER: - Id:GROUPADD_MODIFIER - X:540 - Y:65 - Width:100 - Height:25 - Font:Regular # Label@BINDING_LABEL: # Font:Bold # X:375