Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
newscarousel.c File Reference

Go to the source code of this file.

Enumerations

enum  NewsCategory { DLCS , DLC_PROMO , MISC_PROMO }

Functions

void ~NewsCarousel ()
void ColorHighlight (Widget w)
void ColorNormal (Widget w)
void Destroy ()
 Cleans up the Effect, including unregistering if needed.
string GetButtonLabel (string color)
void NewsCarousel (Widget parent, UIScriptedMenu mainMenu)
void NextArticle ()
void OnAnimationCompleted ()
override bool OnClick (Widget w, int x, int y, int button)
void OnClickNextArticle ()
void OnClickPreviousArticle ()
void OnInputDeviceChanged (EInputDeviceType pInputDeviceType)
override bool OnMouseEnter (Widget w, int x, int y)
override bool OnMouseLeave (Widget w, Widget enterW, int x, int y)
void PreviousArticle ()
void ShowArrowLeft (bool state)
void ShowArrowRight (bool state)
void ShowNewsCarousel (bool show)
void ShowPost (int index)
void ShowPromotion ()
void SwitchNews ()
void Update (float timeslice)
void UpdateCarouselInfo ()

Variables

const float ARTICLE_SWITCH_TIME = 3.0
ref AnimatedGridSpacer m_AnimatedSpacer
int m_ArticleIndex
JsonDataNewsArticle m_CurrentArticle
EInputDeviceType m_CurrentInputDevice
ModInfo m_CurrentModInfo
GridSpacerWidget m_GridSpacer
ButtonWidget m_HotlinkButton
RichTextWidget m_HotlinkButtonLabel
ImageWidget m_Image
MainMenu m_MainMenu
ref array< JsonDataNewsArticlem_NewsArticles
ref Timer m_NewsSwitchTimer
ButtonWidget m_NextPageBtn
ImageWidget m_NextPageBtnIcon
ButtonWidget m_PrevPageBtn
ImageWidget m_PrevPageBtnIcon
Widget m_Root
bool m_SwitchToNext = true
TextWidget m_TitleText
enum NewsCategory MAX_ARTICLES = 3

Enumeration Type Documentation

◆ NewsCategory

Enumerator
DLCS 
DLC_PROMO 
MISC_PROMO 

Definition at line 1 of file newscarousel.c.

Function Documentation

◆ ~NewsCarousel()

void ~NewsCarousel ( )
protected

Definition at line 100 of file newscarousel.c.

References g_Game, m_NewsSwitchTimer, and OnInputDeviceChanged().

◆ ColorHighlight()

void ColorHighlight ( Widget w)
protected

Definition at line 307 of file newscarousel.c.

References ARGB().

Referenced by OptionSelectorBase::OnMouseEnter(), and ServerBrowserTab::OnMouseEnter().

◆ ColorNormal()

void ColorNormal ( Widget w)
protected

Definition at line 312 of file newscarousel.c.

References ARGB().

Referenced by OptionSelectorBase::OnMouseLeave(), and ServerBrowserTab::OnMouseLeave().

◆ GetButtonLabel()

◆ NewsCarousel()

◆ NextArticle()

void NextArticle ( )
protected

◆ OnAnimationCompleted()

void OnAnimationCompleted ( )
protected

◆ OnClick()

override bool OnClick ( Widget w,
int x,
int y,
int button )
protected

◆ OnClickNextArticle()

void OnClickNextArticle ( )
protected

Definition at line 317 of file newscarousel.c.

References m_NewsSwitchTimer, and NextArticle().

Referenced by OnClick().

◆ OnClickPreviousArticle()

void OnClickPreviousArticle ( )
protected

Definition at line 346 of file newscarousel.c.

References m_NewsSwitchTimer, and PreviousArticle().

Referenced by OnClick().

◆ OnInputDeviceChanged()

void OnInputDeviceChanged ( EInputDeviceType pInputDeviceType)
protected

◆ OnMouseEnter()

override bool OnMouseEnter ( Widget w,
int x,
int y )
protected

◆ OnMouseLeave()

override bool OnMouseLeave ( Widget w,
Widget enterW,
int x,
int y )
protected

◆ PreviousArticle()

void PreviousArticle ( )
protected

◆ ShowArrowLeft()

void ShowArrowLeft ( bool state)
protected

Definition at line 397 of file newscarousel.c.

References g_Game, m_CurrentInputDevice, and m_PrevPageBtnIcon.

Referenced by NextArticle(), and PreviousArticle().

◆ ShowArrowRight()

void ShowArrowRight ( bool state)
protected

Definition at line 375 of file newscarousel.c.

References g_Game, m_CurrentInputDevice, and m_NextPageBtnIcon.

Referenced by NextArticle(), and PreviousArticle().

◆ ShowNewsCarousel()

void ShowNewsCarousel ( bool show)
protected

Definition at line 137 of file newscarousel.c.

References m_Root, and UpdateCarouselInfo().

◆ ShowPost()

◆ ShowPromotion()

void ShowPromotion ( )
protected

Definition at line 419 of file newscarousel.c.

References ErrorEx, JsonDataNewsArticle::fullUrl, g_Game, m_ArticleIndex, m_CurrentModInfo, and m_NewsArticles.

Referenced by OnClick().

◆ SwitchNews()

void SwitchNews ( )
protected

◆ Update()

void Update ( float timeslice)
protected

Definition at line 605 of file newscarousel.c.

References m_AnimatedSpacer.

◆ UpdateCarouselInfo()

Variable Documentation

◆ ARTICLE_SWITCH_TIME

const float ARTICLE_SWITCH_TIME = 3.0
protected

Definition at line 11 of file newscarousel.c.

Referenced by UpdateCarouselInfo().

◆ m_AnimatedSpacer

ref AnimatedGridSpacer m_AnimatedSpacer
protected

Definition at line 43 of file newscarousel.c.

Referenced by NextArticle(), PreviousArticle(), Update(), and UpdateCarouselInfo().

◆ m_ArticleIndex

int m_ArticleIndex
protected

◆ m_CurrentArticle

JsonDataNewsArticle m_CurrentArticle
protected

Definition at line 29 of file newscarousel.c.

Referenced by GetButtonLabel(), OnMouseEnter(), OnMouseLeave(), and ShowPost().

◆ m_CurrentInputDevice

EInputDeviceType m_CurrentInputDevice
protected

Definition at line 45 of file newscarousel.c.

Referenced by GetButtonLabel(), OnInputDeviceChanged(), ShowArrowLeft(), and ShowArrowRight().

◆ m_CurrentModInfo

ModInfo m_CurrentModInfo
protected

Definition at line 30 of file newscarousel.c.

Referenced by ShowPost(), and ShowPromotion().

◆ m_GridSpacer

GridSpacerWidget m_GridSpacer
protected

Definition at line 42 of file newscarousel.c.

◆ m_HotlinkButton

ButtonWidget m_HotlinkButton
protected

◆ m_HotlinkButtonLabel

RichTextWidget m_HotlinkButtonLabel
protected

◆ m_Image

ImageWidget m_Image
protected

Definition at line 16 of file newscarousel.c.

◆ m_MainMenu

MainMenu m_MainMenu
protected

Definition at line 39 of file newscarousel.c.

Referenced by NewsCarousel().

◆ m_NewsArticles

◆ m_NewsSwitchTimer

ref Timer m_NewsSwitchTimer
protected

◆ m_NextPageBtn

ButtonWidget m_NextPageBtn
protected

Definition at line 18 of file newscarousel.c.

Referenced by NewsCarousel(), OnClick(), OnMouseEnter(), and OnMouseLeave().

◆ m_NextPageBtnIcon

ImageWidget m_NextPageBtnIcon
protected

◆ m_PrevPageBtn

ButtonWidget m_PrevPageBtn
protected

Definition at line 19 of file newscarousel.c.

Referenced by NewsCarousel(), OnClick(), OnMouseEnter(), and OnMouseLeave().

◆ m_PrevPageBtnIcon

ImageWidget m_PrevPageBtnIcon
protected

◆ m_Root

Widget m_Root
protected

Definition at line 13 of file newscarousel.c.

◆ m_SwitchToNext

bool m_SwitchToNext = true
protected

Definition at line 34 of file newscarousel.c.

Referenced by SwitchNews().

◆ m_TitleText

TextWidget m_TitleText
protected

Definition at line 17 of file newscarousel.c.

Referenced by NewsCarousel(), and ShowPost().

◆ MAX_ARTICLES

enum NewsCategory MAX_ARTICLES = 3

Referenced by ShowPost(), and UpdateCarouselInfo().