- Timestamp:
- 08/31/11 00:29:03 (13 years ago)
- Location:
- ps/trunk/binaries/data/mods/public
- Files:
-
- 3 edited
-
gui/session/selection.js (modified) (3 diffs)
-
gui/session/session.js (modified) (1 diff)
-
simulation/components/GuiInterface.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/binaries/data/mods/public/gui/session/selection.js
r9745 r10140 234 234 235 235 /** 236 * Update selection if some selected entities w asrenamed236 * Update selection if some selected entities were renamed 237 237 * (in case of unit promotion or finishing building structure) 238 238 */ 239 239 EntitySelection.prototype.checkRenamedEntities = function() 240 240 { 241 var renamedEntities = Engine.GuiInterfaceCall("GetRenamedEntities" , true);241 var renamedEntities = Engine.GuiInterfaceCall("GetRenamedEntities"); 242 242 if (renamedEntities.length > 0) 243 243 { … … 393 393 EntityGroupsContainer.prototype.update = function() 394 394 { 395 this.checkRenamedEntities(); 395 396 for each (var group in this.groups) 396 397 { … … 408 409 } 409 410 411 /** 412 * Update control group if some entities in the group were renamed 413 * (in case of unit promotion or finishing building structure) 414 */ 415 EntityGroupsContainer.prototype.checkRenamedEntities = function() 416 { 417 var renamedEntities = Engine.GuiInterfaceCall("GetRenamedEntities"); 418 if (renamedEntities.length > 0) 419 { 420 for each (var group in this.groups) 421 { 422 var addToGroup = []; 423 for each (var renamedEntity in renamedEntities) 424 { 425 if (renamedEntity.entity in group.ents) 426 { 427 group.removeEnt(renamedEntity.entity); 428 addToGroup.push(renamedEntity.newentity); 429 } 430 } 431 group.add(addToGroup); 432 } 433 } 434 } 435 410 436 var g_Groups = new EntityGroupsContainer(); -
ps/trunk/binaries/data/mods/public/gui/session/session.js
r9726 r10140 180 180 else 181 181 getGUIObjectByName("resourcePop").textcolor = "white"; 182 183 // Clear renamed entities list 184 Engine.GuiInterfaceCall("ClearRenamedEntities", {}); 182 185 } 183 186 -
ps/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
r10007 r10140 103 103 }; 104 104 105 GuiInterface.prototype.GetRenamedEntities = function(player, clearList) 106 { 107 var result = this.renamedEntities; 108 if (clearList) 109 this.renamedEntities = []; 110 return result; 105 GuiInterface.prototype.GetRenamedEntities = function(player) 106 { 107 return this.renamedEntities; 108 }; 109 110 GuiInterface.prototype.ClearRenamedEntities = function(player) 111 { 112 this.renamedEntities = []; 111 113 }; 112 114 … … 669 671 "GetExtendedSimulationState": 1, 670 672 "GetRenamedEntities": 1, 673 "ClearRenamedEntities": 1, 671 674 "GetEntityState": 1, 672 675 "GetTemplateData": 1,
Note:
See TracChangeset
for help on using the changeset viewer.
