Index: ps/trunk/binaries/data/config/default.cfg =================================================================== --- ps/trunk/binaries/data/config/default.cfg +++ ps/trunk/binaries/data/config/default.cfg @@ -290,7 +290,6 @@ offscreen = Alt ; Include offscreen units in selection singleselection = "" ; Modifier to select units individually, opposed to per formation. [hotkey.selection.group.add] -0 = "Shift+0", "Shift+Num0" 1 = "Shift+1", "Shift+Num1" 2 = "Shift+2", "Shift+Num2" 3 = "Shift+3", "Shift+Num3" @@ -300,8 +299,8 @@ 7 = "Shift+7", "Shift+Num7" 8 = "Shift+8", "Shift+Num8" 9 = "Shift+9", "Shift+Num9" +10 = "Shift+0", "Shift+Num0" [hotkey.selection.group.save] -0 = "Ctrl+0", "Ctrl+Num0" 1 = "Ctrl+1", "Ctrl+Num1" 2 = "Ctrl+2", "Ctrl+Num2" 3 = "Ctrl+3", "Ctrl+Num3" @@ -311,8 +310,8 @@ 7 = "Ctrl+7", "Ctrl+Num7" 8 = "Ctrl+8", "Ctrl+Num8" 9 = "Ctrl+9", "Ctrl+Num9" +10 = "Ctrl+0", "Ctrl+Num0" [hotkey.selection.group.select] -0 = 0, Num0 1 = 1, Num1 2 = 2, Num2 3 = 3, Num3 @@ -322,6 +321,7 @@ 7 = 7, Num7 8 = 8, Num8 9 = 9, Num9 +10 = 0, Num0 [hotkey.gamesetup] mapbrowser.open = "M" Index: ps/trunk/binaries/data/mods/public/gui/hotkeys/spec/selection.json =================================================================== --- ps/trunk/binaries/data/mods/public/gui/hotkeys/spec/selection.json +++ ps/trunk/binaries/data/mods/public/gui/hotkeys/spec/selection.json @@ -59,10 +59,6 @@ "name": "Single selection", "desc": "Modifier to select units individually, opposed to per formation." }, - "selection.group.save.0": { - "name": "Set Control Group 0", - "desc": "Save current selection as Control Group 0." - }, "selection.group.save.1": { "name": "Set Control Group 1", "desc": "Save current selection as Control Group 1." @@ -99,9 +95,9 @@ "name": "Set Control Group 9", "desc": "Save current selection as Control Group 9." }, - "selection.group.select.0": { - "name": "Select Control Group 0", - "desc": "Change the current selection to Control Group 0." + "selection.group.save.10": { + "name": "Set Control Group 10", + "desc": "Save current selection as Control Group 10." }, "selection.group.select.1": { "name": "Select Control Group 1", @@ -139,9 +135,9 @@ "name": "Select Control Group 9", "desc": "Change the current selection to Control Group 9." }, - "selection.group.add.0": { - "name": "Add Control Group 0", - "desc": "Add Control Group 0 to the current selection." + "selection.group.select.10": { + "name": "Select Control Group 10", + "desc": "Change the current selection to Control Group 10." }, "selection.group.add.1": { "name": "Add Control Group 1", @@ -178,6 +174,10 @@ "selection.group.add.9": { "name": "Add Control Group 9", "desc": "Add Control Group 9 to the current selection." + }, + "selection.group.add.10": { + "name": "Add Control Group 10", + "desc": "Add Control Group 10 to the current selection." } } } Index: ps/trunk/binaries/data/mods/public/gui/session/input.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/session/input.js +++ ps/trunk/binaries/data/mods/public/gui/session/input.js @@ -860,13 +860,13 @@ if (ev.hotkey.indexOf("selection.group.select.") == 0) { let sptr = ev.hotkey.split("."); - performGroup("snap", sptr[3]); + performGroup("snap", sptr[3] - 1); } } else { let sptr = ev.hotkey.split("."); - performGroup(sptr[2], sptr[3]); + performGroup(sptr[2], sptr[3] - 1); doublePressTimer = now; prevHotkey = ev.hotkey; @@ -1607,6 +1607,11 @@ function performGroup(action, groupId) { + if (g_Groups.groups[groupId] === undefined) + { + warn("Invalid groupId " + groupId); + return; + } switch (action) { case "snap": Index: ps/trunk/binaries/data/mods/public/gui/session/session.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/session/session.js +++ ps/trunk/binaries/data/mods/public/gui/session/session.js @@ -751,7 +751,7 @@ for (let i in Engine.GetGUIObjectByName("unitGroupPanel").children) { - Engine.GetGUIObjectByName("unitGroupLabel[" + i + "]").caption = i; + Engine.GetGUIObjectByName("unitGroupLabel[" + i + "]").caption = +i + 1; let button = Engine.GetGUIObjectByName("unitGroupButton[" + i + "]"); button.hidden = g_Groups.groups[i].getTotalCount() == 0;