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

◆ Init() [5/6]

void ScriptedWidgetEventHandler::Init ( DayZGame game)
inlineprotected

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

52 {
53 //as this class is now also being instantiated from within the DayZGame CTOR, where GetGame() does not work yet, we need a way to pass the game instance from DayZGame CTOR
54 //however for modding legacy support purposes, this was done without modifying the CTOR signature with the addition of the Init method,
55 //in order to keep compatibility with existing MODs, there is still a way to instantiate this class properly even without calling Init from the outside
56
57 if (m_Initialized)
58 return;
59 if (!game)//is null when instantiated from DayZGame during loading before calling Init explicitly
60 return;
61 m_Initialized = true;
62
63 m_Game = game;
64 // Load Json File
66 // If load successful
67 if (m_ContentList)
68 {
69 // Build the layout
71 // Get random page index
73 // Populate the layout with data
75 // Start the slideshow
77 }
78 else
79 ErrorEx("Could not create the hint panel. The data are missing!");
80 }
void RandomizePageIndex()
Определения UiHintPanel.c:171
void PopulateLayout()
Определения UiHintPanel.c:114
void BuildLayout(Widget parent_widget)
Определения UiHintPanel.c:93
Widget m_ParentWidget
Определения UiHintPanel.c:29
void StartSlideshow()
Определения UiHintPanel.c:228
bool m_Initialized
Определения UiHintPanel.c:28
void LoadContentList()
Определения UiHintPanel.c:85
DayZGame m_Game
Определения UiHintPanel.c:27
ref array< ref HintPage > m_ContentList
Определения UiHintPanel.c:25
enum ShapeType ErrorEx

Перекрестные ссылки BuildLayout(), ErrorEx, LoadContentList(), m_ContentList, m_Game, m_Initialized, m_ParentWidget, PopulateLayout(), RandomizePageIndex() и StartSlideshow().