DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ AddAgent()

void AddAgent ( string title,
string value,
int id,
float temporaryResistance )
private

См. определение в файле HudDebugWinCharAgents.c строка 189

190 {
191 Widget widget = GetGame().GetWorkspace().CreateWidgets("gui/layouts/debug/day_z_hud_debug_agent.layout", m_WgtAgents);
192 ButtonWidget btn = ButtonWidget.Cast( widget.FindAnyWidget( "TextAgentName" ) );
193 TextWidget countWidget = TextWidget.Cast(widget.FindAnyWidget("TextWidgetAgentCount"));
194 TextWidget tempResistanceWidget = TextWidget.Cast(widget.FindAnyWidget("TextWidgetAgentTempResistanceTime"));
195 Widget activateButton = widget.FindAnyWidget("ButtonAgentActivate");
196 Widget deactivateButton = widget.FindAnyWidget("ButtonAgentDeactivate");
197
198 countWidget.SetText(value);
199 btn.SetText(title);
200 if (temporaryResistance > 0.0)
201 tempResistanceWidget.SetText(string.Format("(R-%1s)", Math.Round(temporaryResistance).ToString()));
202 else
203 tempResistanceWidget.SetText("");
204
205 DebugAgentData data = new DebugAgentData("", id);
206 m_AgentWidgets.Insert(widget);
207 m_AgentWidgetData.Insert(btn, data);
208 m_AgentWidgetData.Insert(activateButton, data);
209 m_AgentWidgetData.Insert(countWidget, data);
210 m_AgentWidgetData.Insert(tempResistanceWidget, data);
211 m_AgentWidgetData.Insert(deactivateButton, data);
212
214 }
ref map< Widget, ref DebugAgentData > m_AgentWidgetData
Определения HudDebugWinCharAgents.c:33
ref array< ref Widget > m_AgentWidgets
Определения HudDebugWinCharAgents.c:32
class DebugAgentData m_WgtAgents
AutoHeightSpacer WgtModifiersContentPanelScript
Определения HudDebugWinCharAgents.c:35
proto native WorkspaceWidget GetWorkspace()
Определения EnMath.c:7
Определения EnWidgets.c:220
Определения EnWidgets.c:190
proto string ToString(bool simple=true)
proto native CGame GetGame()
static proto float Round(float f)
Returns mathematical round of value.
proto native external Widget CreateWidgets(string layout, Widget parentWidget=NULL, bool immedUpdate=true)
Create widgets from *.layout file.

Перекрестные ссылки WorkspaceWidget::CreateWidgets(), GetGame(), CGame::GetWorkspace(), m_AgentWidgetData, m_AgentWidgets, m_WgtAgents, Math::Round(), float::ToString() и WgtModifiersContentPanelScript.

Используется в SetAgents().