Differential D432 Diff 2268 ps/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
Show First 20 Lines • Show All 887 Lines • ▼ Show 20 Lines | for (let ent of cmd.entities) | ||||
} | } | ||||
cmpSelectable.SetSelectionHighlight({ "r": color.r, "g": color.g, "b": color.b, "a": cmd.alpha }, cmd.selected); | cmpSelectable.SetSelectionHighlight({ "r": color.r, "g": color.g, "b": color.b, "a": cmd.alpha }, cmd.selected); | ||||
let cmpRangeVisualization = Engine.QueryInterface(ent, IID_RangeVisualization); | let cmpRangeVisualization = Engine.QueryInterface(ent, IID_RangeVisualization); | ||||
if (!cmpRangeVisualization || player != owner && player != -1) | if (!cmpRangeVisualization || player != owner && player != -1) | ||||
continue; | continue; | ||||
cmpRangeVisualization.SetEnabled(cmd.selected, this.enabledVisualRangeOverlayTypes); | cmpRangeVisualization.SetEnabled(cmd.selected, this.enabledVisualRangeOverlayTypes, false); | ||||
} | } | ||||
}; | }; | ||||
GuiInterface.prototype.EnableVisualRangeOverlayType = function(player, data) | GuiInterface.prototype.EnableVisualRangeOverlayType = function(player, data) | ||||
{ | { | ||||
this.enabledVisualRangeOverlayTypes[data.type] = data.enabled; | this.enabledVisualRangeOverlayTypes[data.type] = data.enabled; | ||||
}; | }; | ||||
Show All 38 Lines | |||||
}; | }; | ||||
GuiInterface.prototype.SetRangeOverlays = function(player, cmd) | GuiInterface.prototype.SetRangeOverlays = function(player, cmd) | ||||
{ | { | ||||
for (let ent of cmd.entities) | for (let ent of cmd.entities) | ||||
{ | { | ||||
let cmpRangeVisualization = Engine.QueryInterface(ent, IID_RangeVisualization); | let cmpRangeVisualization = Engine.QueryInterface(ent, IID_RangeVisualization); | ||||
if (cmpRangeVisualization) | if (cmpRangeVisualization) | ||||
cmpRangeVisualization.SetEnabled(cmd.enabled, this.enabledVisualRangeOverlayTypes); | cmpRangeVisualization.SetEnabled(cmd.enabled, this.enabledVisualRangeOverlayTypes, true); | ||||
} | } | ||||
}; | }; | ||||
GuiInterface.prototype.GetPlayerEntities = function(player) | GuiInterface.prototype.GetPlayerEntities = function(player) | ||||
{ | { | ||||
return Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager).GetEntitiesByPlayer(player); | return Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager).GetEntitiesByPlayer(player); | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 1,062 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator