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

◆ LoadNotificationData()

static void NotificationSystem::LoadNotificationData ( )
inlinestaticprotected

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

281 {
284 string errorMessage;
285 if (!JsonFileLoader<map<NotificationType, NotificationData>>.LoadFile(JSON_FILE_PATH, dataArray, errorMessage))
286 ErrorEx(errorMessage);
287
288 m_Instance.m_DataArray.Copy(dataArray);
289
290 array<int> notificationTypes = new array<int>();
291 NotificationType notificationType = 0;
292 while (notificationType != NotificationType.NOTIFICATIONS_END)
293 {
294 notificationTypes.Insert(notificationType);
295 notificationType++;
296 }
297
298 for (int i = 0; i < m_Instance.m_DataArray.Count(); ++i)
299 {
300 notificationTypes.RemoveItem(m_Instance.m_DataArray.GetKey(i));
301 }
302
303 if (notificationTypes.Count() > 0)
304 {
305 foreach (NotificationType notificationType2 : notificationTypes)
306 {
307 NotificationData notificationData = new NotificationData(
308 "please_add_an_icon",
309 "please_add_a_title",
310 "optional_description",
311 );
312
313 m_Instance.m_DataArray.Insert(notificationType2, notificationData);
314 }
315
316 if (!JsonFileLoader<map<NotificationType, ref NotificationData>>.SaveFile(JSON_FILE_PATH, m_Instance.m_DataArray, errorMessage))
317 ErrorEx(errorMessage);
318 }
319 }
map
Определения ControlsXboxNew.c:4
NotificationType
DEPRECATED (moved into NotificationSystem)
Определения NotificationSystem.c:4
static const string JSON_FILE_PATH
Определения NotificationSystem.c:74
static ref NotificationSystem m_Instance
Определения NotificationSystem.c:79
enum ShapeType ErrorEx

Перекрестные ссылки ErrorEx, JSON_FILE_PATH и m_Instance.