Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/session/selection_details.js
Show First 20 Lines • Show All 139 Lines • ▼ Show 20 Lines | Engine.GetGUIObjectByName("healthStats").caption = sprintf(translate("%(hitpoints)s / %(maxHitpoints)s"), { | ||||
"hitpoints": Math.ceil(entState.hitpoints), | "hitpoints": Math.ceil(entState.hitpoints), | ||||
"maxHitpoints": Math.ceil(entState.maxHitpoints) | "maxHitpoints": Math.ceil(entState.maxHitpoints) | ||||
}); | }); | ||||
healthSection.size = sectionPosTop.size; | healthSection.size = sectionPosTop.size; | ||||
captureSection.size = showResource ? sectionPosMiddle.size : sectionPosBottom.size; | captureSection.size = showResource ? sectionPosMiddle.size : sectionPosBottom.size; | ||||
resourceSection.size = showResource ? sectionPosBottom.size : sectionPosMiddle.size; | resourceSection.size = showResource ? sectionPosBottom.size : sectionPosMiddle.size; | ||||
} | } | ||||
else | else if (showResource) | ||||
{ | { | ||||
captureSection.size = sectionPosBottom.size; | captureSection.size = sectionPosBottom.size; | ||||
resourceSection.size = sectionPosTop.size; | resourceSection.size = sectionPosTop.size; | ||||
} | } | ||||
else | |||||
wraitii: Suggestion: might be better to if showCapture and have a 'else warn' or something | |||||
captureSection.size = sectionPosTop.size; | |||||
// CapturePoints | // CapturePoints | ||||
captureSection.hidden = !entState.capturePoints; | captureSection.hidden = !entState.capturePoints; | ||||
if (entState.capturePoints) | if (entState.capturePoints) | ||||
{ | { | ||||
let setCaptureBarPart = function(playerID, startSize) { | let setCaptureBarPart = function(playerID, startSize) { | ||||
let unitCaptureBar = Engine.GetGUIObjectByName("captureBar[" + playerID + "]"); | let unitCaptureBar = Engine.GetGUIObjectByName("captureBar[" + playerID + "]"); | ||||
let sizeObj = unitCaptureBar.size; | let sizeObj = unitCaptureBar.size; | ||||
▲ Show 20 Lines • Show All 384 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Suggestion: might be better to if showCapture and have a 'else warn' or something