Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/session/PanelEntity.js
Show All 25 Lines | constructor(selection, entityID, buttonID, orderKey) | ||||
this.panelEntityCaptureBar = Engine.GetGUIObjectByName("panelEntityCapture[" + buttonID + "]"); | this.panelEntityCaptureBar = Engine.GetGUIObjectByName("panelEntityCapture[" + buttonID + "]"); | ||||
this.panelEntButton = Engine.GetGUIObjectByName("panelEntityButton[" + buttonID + "]"); | this.panelEntButton = Engine.GetGUIObjectByName("panelEntityButton[" + buttonID + "]"); | ||||
this.panelEntButton.onPress = this.onPress.bind(this); | this.panelEntButton.onPress = this.onPress.bind(this); | ||||
this.panelEntButton.onDoublePress = this.onDoublePress.bind(this); | this.panelEntButton.onDoublePress = this.onDoublePress.bind(this); | ||||
this.panelEntButton.hidden = false; | this.panelEntButton.hidden = false; | ||||
let entityState = GetEntityState(entityID); | let entityState = GetEntityState(entityID); | ||||
let template = GetTemplateData(entityState.template); | let template = GetTemplateData(entityState.template); | ||||
this.nameTooltip = setStringTags(template.name.specific, this.NameTags) + "\n"; | this.nameTooltip = setStringTags(g_SpecificNamesPrimary ? template.name.specific : template.name.generic, this.NameTags) + "\n"; | ||||
Engine.GetGUIObjectByName("panelEntityHealthSection[" + buttonID + "]").hidden = !entityState.hitpoints; | Engine.GetGUIObjectByName("panelEntityHealthSection[" + buttonID + "]").hidden = !entityState.hitpoints; | ||||
let captureSection = Engine.GetGUIObjectByName("panelEntityCaptureSection[" + buttonID + "]"); | let captureSection = Engine.GetGUIObjectByName("panelEntityCaptureSection[" + buttonID + "]"); | ||||
captureSection.hidden = !entityState.capturePoints; | captureSection.hidden = !entityState.capturePoints; | ||||
if (entityState.capturePoints) | if (entityState.capturePoints) | ||||
{ | { | ||||
this.capturePoints = entityState.capturePoints; | this.capturePoints = entityState.capturePoints; | ||||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator