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

◆ SetPing()

void ScriptedWidgetEventHandler::SetPing ( int ping)
inlineprivate

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

381 {
382 int color;
383 string displayValue;
384
385 if (ping < 50)
386 color = ARGBF(1, 0, 1, 0);
387 else if(ping < 100)
388 color = ARGBF(1, 0.8, 0.8, 0);
389 else if( ping < 200 )
390 color = ARGBF(1, 1, 0.5, 0);
391 else
392 color = ARGBF(1, 1, 0, 0);
393
394 if (IsOnline())
395 {
396 displayValue = ping.ToString();
397 }
398
399 else
400 {
401 displayValue = "-";
402 }
403
404 m_ServerPing.SetColor(color);
405 m_ServerPing.SetText(displayValue);
406 }
TextWidget m_ServerPing
Определения ServerBrowserEntry.c:10
int ARGBF(float fa, float fr, float fg, float fb)
Converts <0.0, 1.0> ARGB into color.
Определения proto.c:332

Перекрестные ссылки ARGBF(), IsOnline() и m_ServerPing.

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