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

◆ UpdateStatWidgets()

void PluginBase::UpdateStatWidgets ( )
inlineprotected

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

156 {
157 int i = 0;
158 int utsDebugCount = m_UTemperatureSourceDebugs.Count();
159 for (; i < utsDebugCount && i < MAX_SIMULTANEOUS_UTS; ++i)
160 {
161 UTemperatureSourceDebug utsd = m_UTemperatureSourceDebugs[i];
162 vector pos = utsd.GetValue(0).ToVector();
163 vector screen_pos_stats = GetGame().GetScreenPos(pos + "0 0 0");
164 vector screen_pos_damage = GetGame().GetScreenPos(pos + "0 2 0");
165 m_RootWidget[i].SetPos(screen_pos_stats[0], screen_pos_stats[1]);
166
167 if (screen_pos_stats[2] > 0 && screen_pos_stats[0] > 0 && screen_pos_stats[1] > 0)
168 {
169 m_RootWidget[i].Show(true);
170 UpdateStatWidget(i, utsd);
171 }
172 else
173 {
174 m_RootWidget[i].Show(false);
175 }
176 }
177
178 for (; i < MAX_SIMULTANEOUS_UTS; ++i)
179 {
180 if (m_RootWidget[i])
181 {
182 m_RootWidget[i].Show(false);
183 }
184 }
185 }
proto native vector GetScreenPos(vector world_pos)
Transforms position in world to position in screen in pixels as x, y component of vector,...
void UpdateStatWidget(int rowIndex, UTemperatureSourceDebug utsd)
ref array< ref UTemperatureSourceDebug > m_UTemperatureSourceDebugs
const int MAX_SIMULTANEOUS_UTS
ref Widget m_RootWidget[MAX_SIMULTANEOUS_UTS]
proto native CGame GetGame()

Перекрестные ссылки GetGame(), CGame::GetScreenPos(), m_RootWidget, m_UTemperatureSourceDebugs, MAX_SIMULTANEOUS_UTS и UpdateStatWidget().

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