Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/session/selection.js
// Limits selection size | // Limits selection size | ||||
var g_MaxSelectionSize = 200; | var g_MaxSelectionSize = 200; | ||||
// Alpha value of hovered/mouseover/highlighted selection overlays | // Alpha value of hovered/mouseover/highlighted selection overlays | ||||
// (should probably be greater than always visible alpha value, | // (should probably be greater than always visible alpha value, | ||||
// see CCmpSelectable) | // see CCmpSelectable) | ||||
var g_HighlightedAlpha = 0.75; | var g_HighlightedAlpha = 0.75; | ||||
function _setHighlight(ents, alpha, selected) | function _setHighlight(ents, alpha, selected) | ||||
{ | { | ||||
if (ents.length) | if (ents.length) | ||||
Engine.GuiInterfaceCall("SetSelectionHighlight", { "entities":ents, "alpha":alpha, "selected":selected }); | Engine.GuiInterfaceCall("SetSelectionHighlight", { "entities":ents, "alpha":alpha, "selected":selected }); | ||||
} | } | ||||
function _setStatusBars(ents, enabled) | function _setStatusBars(ents, enabled) | ||||
{ | { | ||||
if (ents.length) | if (!ents.length) | ||||
Engine.GuiInterfaceCall("SetStatusBars", { "entities":ents, "enabled":enabled }); | return; | ||||
Engine.GuiInterfaceCall("SetStatusBars", { | |||||
"entities": ents, | |||||
"enabled": enabled, | |||||
"showRank": Engine.ConfigDB_GetValue("user", "gui.session.rankabovestatusbar") == "true" | |||||
}); | |||||
bb: ```
if (foo)
doFoo()
```
as it is done in the context too | |||||
ImarokAuthorUnsubmitted Not Done Inline ActionsDid this originally, but @elexis wanted an early return and I don't care. Imarok: Did this originally, but @elexis wanted an early return and I don't care.
So please come to an… | |||||
} | } | ||||
function _setMotionOverlay(ents, enabled) | function _setMotionOverlay(ents, enabled) | ||||
{ | { | ||||
if (ents.length) | if (ents.length) | ||||
Engine.GuiInterfaceCall("SetMotionDebugOverlay", { "entities":ents, "enabled":enabled }); | Engine.GuiInterfaceCall("SetMotionDebugOverlay", { "entities":ents, "enabled":enabled }); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 482 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
as it is done in the context too