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

◆ Init()

override Widget Init ( )
protected

Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)

pre-init arrays

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

311 {
312 layoutRoot = GetGame().GetWorkspace().CreateWidgets("gui/layouts/xbox/control_mapping_info_screen.layout");
313
314 layoutRoot.FindAnyWidget("Tabber").GetScript(m_TabScript);
315
316 m_TabScript.m_OnTabSwitch.Insert(DrawConnectingLines);
317
318 m_Back = ButtonWidget.Cast(layoutRoot.FindAnyWidget("back"));
319
320 #ifdef PLATFORM_CONSOLE
321 RichTextWidget toolbar_switch = RichTextWidget.Cast(layoutRoot.FindAnyWidget("ChangePresetIcon"));
322 RichTextWidget toolbar_back = RichTextWidget.Cast(layoutRoot.FindAnyWidget("BackIcon"));
323 toolbar_switch.SetText(InputUtils.GetRichtextButtonIconFromInputAction("UASwitchPreset", "", EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
324 toolbar_back.SetText(InputUtils.GetRichtextButtonIconFromInputAction("UAUIBack", "", EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
325 #endif
326
327 #ifdef PLATFORM_XBOX
328 layoutRoot.FindAnyWidget("XboxControlsImage").Show(true);
329 #else
330 #ifdef PLATFORM_PS4
331 layoutRoot.FindAnyWidget("PSControlsImage").Show(true);
332 #endif
333 #endif
334
335 m_tab_images[0] = ImageWidget.Cast(layoutRoot.FindAnyWidget("MovementTabBackdropImageWidget"));
336 m_tab_images[1] = ImageWidget.Cast(layoutRoot.FindAnyWidget("WeaponsAndActionsBackdropImageWidget"));
337 m_tab_images[2] = ImageWidget.Cast(layoutRoot.FindAnyWidget("InventoryTabBackdropImageWidget"));
338 m_tab_images[3] = ImageWidget.Cast(layoutRoot.FindAnyWidget("MenusTabBackdropImageWidget"));
339
340 PPERequester_MenuEffects requester;
341 Class.CastTo(requester,PPERequesterBank.GetRequester(PPERequesterBank.REQ_MENUEFFECTS));
342 requester.SetVignetteIntensity(0.6);
343
345
346 return layoutRoot;
347 }
void DrawConnectingLines(int index)
Определения ControlsXbox.c:41
TabberUI m_TabScript
Определения ControlsXbox.c:21
ButtonWidget m_Back
Определения ControlsXbox.c:17
ImageWidget m_tab_images[TABS_COUNT]
Определения ControlsXbox.c:20
proto native WorkspaceWidget GetWorkspace()
Super root of all classes in Enforce script.
Определения EnScript.c:11
static string GetRichtextButtonIconFromInputAction(notnull UAInput pInput, string pLocalizedDescription, int pInputDeviceType=EUAINPUT_DEVICE_CONTROLLER, float pScale=ICON_SCALE_NORMAL, bool pVertical=false)
Определения InputUtils.c:167
static const float ICON_SCALE_TOOLBAR
Определения InputUtils.c:15
Определения InputUtils.c:2
Определения gameplay.c:317
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
proto native external Widget CreateWidgets(string layout, Widget parentWidget=NULL, bool immedUpdate=true)
Create widgets from *.layout file.

Перекрестные ссылки Class::CastTo(), WorkspaceWidget::CreateWidgets(), DrawConnectingLines(), UIScriptedMenu::DrawConnectingLines(), GetGame(), InputUtils::GetRichtextButtonIconFromInputAction(), CGame::GetWorkspace(), InputUtils::ICON_SCALE_TOOLBAR, m_Back, m_tab_images и m_TabScript.