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

◆ SetTimeIcon()

void ScriptedWidgetEventHandler::SetTimeIcon ( string time,
float multiplier )
inlineprotected

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

224 {
225 if (time != "")
226 {
227 TStringArray arr = new TStringArray;
228 time.Split(":", arr);
229
230 if (arr.Count() == 2)
231 {
232 int hour = arr.Get(0).ToInt();
233 int minute = arr.Get(1).ToInt();
234
235 if (hour >= 19 || hour <= 5) //Night
236 {
237 if (multiplier > 1)
238 m_TimeIcon.SetImage(3);
239 else
240 m_TimeIcon.SetImage(2);
241 }
242 else //Day
243 {
244 if (multiplier > 1)
245 m_TimeIcon.SetImage(1);
246 else
247 m_TimeIcon.SetImage(0);
248 }
249
250 m_TimeIcon.Show(true);
251 m_TimeAccelerationResult.Show(false);
252 }
253 }
254 else
255 {
256 m_TimeIcon.Show(false);
257 m_TimeAccelerationResult.Show(true);
258 m_TimeAccelerationResult.SetText("-");
259 }
260 }
TextWidget m_TimeAccelerationResult
Определения ServerBrowserDetailsContainer.c:19
array< string > TStringArray
Определения EnScript.c:685
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
Определения EnString.c:396

Перекрестные ссылки m_TimeAccelerationResult, m_TimeIcon и string::Split().

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