Ticket #1989: selection_limitation.diff
File selection_limitation.diff, 3.8 KB (added by , 11 years ago) |
---|
-
binaries/data/config/default.cfg
263 263 hotkey.selection.group.select.9 = 9 264 264 hotkey.selection.group.save.9 = "Ctrl+9" 265 265 hotkey.selection.group.add.9 = "Shift+9" 266 hotkey.selection.part1 = "Num1" ; select one part of a selection 267 hotkey.selection.part2 = "Num2" 268 hotkey.selection.part3 = "Num3" 269 hotkey.selection.part4 = "Num4" 270 hotkey.selection.part5 = "Num5" 271 hotkey.selection.part6 = "Num6" 272 hotkey.selection.part7 = "Num7" 273 hotkey.selection.part8 = "Num8" 274 hotkey.selection.part9 = "Num9" 266 275 267 276 ; > SESSION CONTROLS 268 277 hotkey.session.kill = Delete ; Destroy selected units -
binaries/data/mods/public/gui/manual/intro.txt
66 66 Ctrl + 1 (and so on up to Ctrl + 0): Create control group 1 (to 0) from the selected units/buildings 67 67 1 (and so on up to 0): Select the units/buildings in control group 1 (to 0) 68 68 Shift + 1 (to 0): Add selected units/buildings to control group 1 (to 0) 69 Numpad 1 (and so on, up to Numpad 9): Restrict the selection to the number you pushed (f.e. 4 units if you pressed '4'). Hold Shift to multiply it by five (f.e. 20 units if you pressed Shift+4) 69 70 Ctrl + F5 (and so on up to F8): Mark the current camera position, for jumping back to later. 70 71 F5, F6, F7, and F8: Move the camera to a marked position. Jump back to the last location if the camera is already over the marked position. 71 72 Z, X, C, V, B, N, M: With training buildings selected. Add the 1st, 2nd, ... unit shown to the training queue for all the selected buildings. -
binaries/data/mods/public/gui/session/input.js
1094 1094 prevHotkey = ev.hotkey; 1095 1095 } 1096 1096 } 1097 if (ev.hotkey.indexOf("selection.part") == 0 ) 1098 { 1099 var num = +ev.hotkey.charAt(ev.hotkey.length - 1); 1100 performSelectionPart(num); 1101 } 1097 1102 break; 1098 1103 } 1099 1104 break; … … 1857 1862 } 1858 1863 } 1859 1864 1865 // Perform part the selection 1866 function performSelectionPart(number) 1867 { 1868 if( Engine.HotkeyIsPressed("session.queue")) 1869 { 1870 g_Selection.selectPart(number*5); 1871 } 1872 else 1873 { 1874 g_Selection.selectPart(+number); 1875 } 1876 } 1877 1860 1878 // Performs the specified group 1861 1879 function performGroup(action, groupId) 1862 1880 { -
binaries/data/mods/public/gui/session/selection.js
213 213 } 214 214 215 215 /** 216 * Remove entities from selection until you have exactly 'number' left 217 * Prefer to keep idle entities 218 */ 219 EntitySelection.prototype.selectPart = function(number) 220 { 221 var ents = this.selected; 222 var count = 0; 223 var newSelection = {}; 224 225 for each (var ent in ents) 226 { 227 var entState = GetEntityState(ent); 228 // prefer idle entities 229 if (entState && entState.unitAI && entState.unitAI.state == "INDIVIDUAL.IDLE") 230 { 231 newSelection[ent] = ents[ent]; 232 delete ents[ent]; 233 234 if ( ++count >= number ) 235 break; 236 } 237 } 238 239 for each (var ent in ents) 240 { 241 242 if ( ++count > number ) 243 break; 244 newSelection[ent] = ents[ent]; 245 246 } 247 248 this.reset(); 249 this.addList(newSelection); 250 } 251 252 /** 216 253 * Update the selection to take care of changes (like units that have been killed) 217 254 */ 218 255 EntitySelection.prototype.update = function()