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
158 for (
int i = 0; i < newsData.
News.Count(); i++)
185 if (articlesCount == 0)
192 if (articlesCount == 1)
194 Widget pageIndicators =
m_Root.FindAnyWidget(
"nf_pages");
197 pageIndicators.Show(
false);
200 #ifndef PLATFORM_CONSOLE
203 m_NextPageBtnIconConsole.Show(
false);
214 if (j > articlesCount)
230 int maxColums = (articlesCount - 1);
264 ImageWidget imageW = ImageWidget.Cast(
m_Root.FindAnyWidget(
"nf_image" + index));
280 if ((i - 1) == index)
306 w.SetColor(
ARGB(255, 255, 0, 0));
311 w.SetColor(
ARGB(140, 0, 0, 0));
376 #ifdef PLATFORM_CONSOLE
379 m_NextPageBtnIconConsole.Show(state);
385 if (
g_Game.GetInput().IsEnabledMouseAndKeyboard())
398 #ifdef PLATFORM_CONSOLE
401 m_PrevPageBtnIconConsole.Show(state);
407 if (
g_Game.GetInput().IsEnabledMouseAndKeyboard())
512 switch (pInputDeviceType)
520 #ifdef PLATFORM_CONSOLE
521 m_NextPageBtnIconConsole.Show(showNext);
522 m_PrevPageBtnIconConsole.Show(showPrevious);
528 if (
g_Game.GetInput().IsEnabledMouseAndKeyboard())
532 #ifdef PLATFORM_CONSOLE
533 m_NextPageBtnIconConsole.Show(
false);
534 m_PrevPageBtnIconConsole.Show(
false);
547 #ifdef PLATFORM_WINDOWS
548 shopLabel =
"#dlc_open_store";
551 #ifdef PLATFORM_CONSOLE
552 #ifdef PLATFORM_MSSTORE
553 shopLabel =
"#dlc_open_store_Xbox";
556 shopLabel =
"#dlc_open_store_Xbox";
558 shopLabel =
"#dlc_open_store_PS";
571 shopLabel =
"#dlc_news_wishlist";
575 shopLabel =
"#dlc_news_comingsoon";
581 shopLabel =
"#dlc_news_learn_more";
587 string label = shopLabel;
588 string linkIcon =
string.
Format(
"<image set=\"%1\" name=\"%2\" scale=\"%3\"/>",
"dayz_gui",
"externallink", 0.9);
595 string fullLabel =
string.
Format(
"<color rgba=\"%1\">%2 %3</color>", color, label, linkIcon);
597 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()
ref array< JsonDataNewsArticle > m_NewsArticles
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 > 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)