23 #ifdef PLATFORM_CONSOLE
24 protected ImageWidget m_NextPageBtnIconConsole;
25 protected ImageWidget m_PrevPageBtnIconConsole;
36 #ifdef PLATFORM_CONSOLE
49 m_Root =
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/news_carousel.layout", parent);
62 #ifdef PLATFORM_CONSOLE
64 m_NextPageBtnIconConsole = ImageWidget.Cast(
m_Root.FindAnyWidget(
"next_icon_console"));
65 m_PrevPageBtnIconConsole = ImageWidget.Cast(
m_Root.FindAnyWidget(
"prev_icon_console"));
68 m_NextPageBtnIconConsole.LoadImageFile(0,
"set:xbox_buttons image:DPAD_right");
69 m_PrevPageBtnIconConsole.LoadImageFile(0,
"set:xbox_buttons image:DPAD_left");
71 m_NextPageBtnIconConsole.LoadImageFile(0,
"set:playstation_buttons image:DPAD_right");
72 m_PrevPageBtnIconConsole.LoadImageFile(0,
"set:playstation_buttons image:DPAD_left");
76 #ifdef PLATFORM_CONSOLE
90 #ifdef PLATFORM_CONSOLE
187 if (!modInfo || (modInfo && !modInfo.
GetIsOwned()))
205 if (articlesCount == 0)
212 if (articlesCount == 1)
214 Widget pageIndicators =
m_Root.FindAnyWidget(
"nf_pages");
217 pageIndicators.Show(
false);
220 #ifndef PLATFORM_CONSOLE
223 m_NextPageBtnIconConsole.Show(
false);
234 if (j > articlesCount)
250 if (articlesCount > 1)
290 ImageWidget imageW = ImageWidget.Cast(
m_Root.FindAnyWidget(
"nf_image" + index));
306 if ((i - 1) == index)
332 w.SetColor(
ARGB(255, 255, 0, 0));
337 w.SetColor(
ARGB(140, 0, 0, 0));
405 #ifdef PLATFORM_CONSOLE
408 m_NextPageBtnIconConsole.Show(state);
414 if (
g_Game.GetInput().IsEnabledMouseAndKeyboard())
427 #ifdef PLATFORM_CONSOLE
430 m_PrevPageBtnIconConsole.Show(state);
436 if (
g_Game.GetInput().IsEnabledMouseAndKeyboard())
545 switch (pInputDeviceType)
553 #ifdef PLATFORM_CONSOLE
554 m_NextPageBtnIconConsole.Show(showNext);
555 m_PrevPageBtnIconConsole.Show(showPrevious);
561 if (
g_Game.GetInput().IsEnabledMouseAndKeyboard())
565 #ifdef PLATFORM_CONSOLE
566 m_NextPageBtnIconConsole.Show(
false);
567 m_PrevPageBtnIconConsole.Show(
false);
580 #ifdef PLATFORM_WINDOWS
581 shopLabel =
"#dlc_open_store";
584 #ifdef PLATFORM_CONSOLE
585 #ifdef PLATFORM_MSSTORE
586 shopLabel =
"#dlc_open_store_Xbox";
589 shopLabel =
"#dlc_open_store_Xbox";
591 shopLabel =
"#dlc_open_store_PS";
604 shopLabel =
"#dlc_news_wishlist";
608 shopLabel =
"#dlc_news_comingsoon";
614 shopLabel =
"#dlc_news_learn_more";
620 string label = shopLabel;
621 string linkIcon =
string.
Format(
"<image set=\"%1\" name=\"%2\" scale=\"%3\"/>",
"dayz_gui",
"externallink", 0.9);
628 string fullLabel =
string.
Format(
"<color rgba=\"%1\">%2 %3</color>", color, label, linkIcon);
630 fullLabel =
string.
Format(
"<color rgba=\"%1\">%2</color>", color, label);
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
enum AnimatedGridSpacerEasingType m_GridSpacer
void AnimatedGridSpacer(Widget gridSpacer, int maxColums, float animDuration=0.25, AnimatedGridSpacerEasingType easing=AnimatedGridSpacerEasingType.EASE_IN_OUT_CUBIC)
AnimatedGridSpacerEasingType
ButtonWidget m_NextPageBtn
ButtonWidget m_PrevPageBtn
void OnClickPreviousArticle()
ImageWidget m_NextPageBtnIcon
RichTextWidget m_HotlinkButtonLabel
void UpdateCarouselInfo()
void ShowArrowRight(bool state)
ref AnimatedGridSpacer m_AnimatedSpacer
ButtonWidget m_HotlinkButton
void OnClickNextArticle()
JsonDataNewsArticle m_CurrentArticle
const float ARTICLE_SWITCH_TIME
enum NewsCategory MAX_ARTICLES
void ShowArrowLeft(bool state)
ref Timer m_NewsSwitchTimer
EInputDeviceType m_CurrentInputDevice
string GetButtonLabel(string color)
void OnAnimationCompleted()
ImageWidget m_PrevPageBtnIcon
void NewsCarousel(Widget parent, UIScriptedMenu mainMenu)
void ShowNewsCarousel(bool show)
ref array< ref JsonDataNewsArticle > m_NewsArticles
ref array< ref JsonDataNewsArticle > News
static JsonDataNewsList GetNewsData()
static ModInfo GetDLCModInfoByName(string dlcName)
DLCs only.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native void Destroy()
Cleans up the Effect, including unregistering if needed.
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.
int ARGB(int a, int r, int g, int b)