DayZ 1.24
Loading...
Searching...
No Matches
CreditsDepartmentElement.c File Reference

Go to the source code of this file.

Classes

class  CreditsElement
 

Functions

void CreditsDepartmentSection (int index, Widget parent, JsonDataCreditsSection section_data)
 
void LoadDataAsync (array< string > section_data)
 

Variables

class CreditsDepartmentElement extends CreditsElement m_SectionTitle
 
WrapSpacerWidget m_SectionSections
 
ref array< Widgetm_SectionEntries = new array<Widget>
 

Function Documentation

◆ CreditsDepartmentSection()

void CreditsDepartmentSection ( int index,
Widget parent,
JsonDataCreditsSection section_data )
protected

Definition at line 43 of file CreditsDepartmentElement.c.

44 {
45 m_Root = GetGame().GetWorkspace().CreateWidgets("gui/layouts/new_ui/credits/department_element/department_section.layout", parent);
46 m_SectionTitle = TextWidget.Cast(m_Root.FindAnyWidget("section_title"));
47 m_SectionSections = WrapSpacerWidget.Cast(m_Root.FindAnyWidget("section_elements"));
48
49 if (section_data.SectionName != "")
50 m_SectionTitle.SetText(section_data.SectionName);
51 else
52 {
53 m_SectionTitle.Show(false);
54 m_Root.FindAnyWidget("SeparatorPanel").Show(false);
55 }
56
57 LoadDataAsync(section_data.SectionLines);
58 m_Root.SetSort(index);
59 }
WrapSpacerWidget m_SectionSections
class CreditsDepartmentElement extends CreditsElement m_SectionTitle
void LoadDataAsync(array< string > section_data)
Widget m_Root
Definition SizeToChild.c:85
proto native CGame GetGame()

References GetGame(), CreditsElement::LoadDataAsync(), m_Root, m_SectionSections, and m_SectionTitle.

Referenced by CreditsElement::LoadDataAsync().

◆ LoadDataAsync()

void LoadDataAsync ( array< string > section_data)
protected

Definition at line 61 of file CreditsDepartmentElement.c.

62 {
63 for (int i = 1; i <= section_data.Count(); i++)
64 {
65 TextWidget w = TextWidget.Cast(GetGame().GetWorkspace().CreateWidgets("gui/layouts/new_ui/credits/department_element/department_section_element.layout", m_SectionSections));
66 w.SetText(section_data.Get(i - 1) + " \n");
67 w.Update();
68 m_Root.SetSort(i);
69 m_SectionEntries.Insert(w);
70 }
71
72 m_SectionSections.Update();
73 }
ref array< Widget > m_SectionEntries

References GetGame(), m_Root, m_SectionEntries, and m_SectionSections.

Variable Documentation

◆ m_SectionEntries

ref array<Widget> m_SectionEntries = new array<Widget>
protected

Definition at line 41 of file CreditsDepartmentElement.c.

Referenced by LoadDataAsync().

◆ m_SectionSections

WrapSpacerWidget m_SectionSections
protected

Definition at line 40 of file CreditsDepartmentElement.c.

Referenced by CreditsDepartmentSection(), and LoadDataAsync().

◆ m_SectionTitle

class CreditsDepartmentElement extends CreditsElement m_SectionTitle