Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_WarCrimesPanelUI.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
3{
4
6
10
11 [Attribute(defvalue: "0.302 0.302 0.302 1", desc: "War crimes header background color")]
13
14 [Attribute("{FDD5423E69D007F8}UI/Textures/Icons/icons_wrapperUI-128.imageset", UIWidgets.ResourcePickerThumbnail)]
16
17 [Attribute(defvalue: "1 1 1 1", desc: "No war crimes header image color")]
19
20 [Attribute("HeaderImageNoWarCrimes")]
22
23 [Attribute(params: "No war crimes title")]
24 protected string m_sNoWarCrimesTitleString;
25
26 [Attribute(params: "No war crimes subtitle")]
28
29 [Attribute("{FDD5423E69D007F8}UI/Textures/Icons/icons_wrapperUI-128.imageset", UIWidgets.ResourcePickerThumbnail)]
31
32 [Attribute(defvalue: "1 0 0 1", desc: "War crimes header image color")]
34
35 [Attribute("HeaderImageNoWarCrimes")]
37
38 [Attribute(params: "War crimes title")]
39 protected string m_sWarCrimesTitleString;
40
41 [Attribute(params: "War crimes subtitle")]
43
44 [Attribute(params: "War Crimes Entry layout")]
46
47 [Attribute("{FDD5423E69D007F8}UI/Textures/Icons/icons_wrapperUI-128.imageset", UIWidgets.ResourcePickerThumbnail)]
49
50 [Attribute(defvalue: "1 0 0 1", desc: "War crimes entry image color")]
52
53 [Attribute(defvalue: "0.19608 0.06667 0.06667 1", desc: "War crimes entry image color")]
55
56 [Attribute("EntryImageNoWarCrimes")]
58
59 [Attribute(params: "Harming friendlies string")]
61
62 [Attribute(defvalue: "0.761 0.392 0.078 1", desc: "No War Crimes subtitle color")]
64
65 [Attribute(defvalue: "0.502 0 0 1", desc: "War Crimes subtitle color")]
67
68 protected bool m_bActiveWarCrimes = false;
69
70 //------------------------------------------------------------------------------------------------
71 protected override void HandlerAttached(Widget w)
72 {
73 m_wRootWidget = w;
74 m_WarCrimesHeaderImage = ImageWidget.Cast(m_wRootWidget.FindAnyWidget("WarCrimesHeaderImage"));
75 m_WarCrimesHeaderTitle = RichTextWidget.Cast(m_wRootWidget.FindAnyWidget("WarCrimesTitle"));
76 m_WarCrimesHeaderSubTitle = RichTextWidget.Cast(m_wRootWidget.FindAnyWidget("WarCrimesSubtitle"));
77 WarCrimesActive(false);
78
79 ImageWidget backgroundHeader = ImageWidget.Cast(m_wRootWidget.FindAnyWidget("Background1"));
80 if (backgroundHeader)
81 backgroundHeader.SetColor(m_iWarCrimesHeaderBackgroundColor);
82 }
83
84 //------------------------------------------------------------------------------------------------
85 void CreateWarCrimeEntry(SCR_EWarCrimes crime)
86 {
87 WorkspaceWidget workspace = GetGame().GetWorkspace();
88 if (!workspace)
89 return;
90
91 Widget container = m_wRootWidget.FindAnyWidget("WarCrimeEntriesContainer");
92 if (!container)
93 return;
94
95 switch (crime)
96 {
97 case SCR_EWarCrimes.HARMINGFRIENDLIES:
98 Widget entry = workspace.CreateWidgets(m_WarCrimesEntryLayout, container);
99 if (!entry)
100 return;
101
102 RichTextWidget entryText = RichTextWidget.Cast(entry.FindAnyWidget("WarCrimeEntryText"));
103 ImageWidget entryImage = ImageWidget.Cast(entry.FindAnyWidget("WarCrimeEntryImage"));
104 if (!entryText || !entryImage)
105 return;
106
107 entryText.SetText(m_sHarmingFriendliesString);
109 entryImage.SetColor(m_iWarCrimesEntryColor);
110 break;
111 default: return;
112 }
113
115 WarCrimesActive(true);
116 }
117
118 //------------------------------------------------------------------------------------------------
148}
149
150enum SCR_EWarCrimes
151{
152 HARMINGFRIENDLIES
153}
ArmaReforgerScripted GetGame()
Definition game.c:1398
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition Color.c:13
Base class for all final Reforger interactive elements.
static bool SetTexture(ImageWidget widget, ResourceName texture, string image="")
RichTextWidget m_WarCrimesHeaderTitle
ResourceName m_WarCrimesEntryLayout
RichTextWidget m_WarCrimesHeaderSubTitle
ref Color m_iWarCrimesEntryBackgroundColor
ResourceName m_TextureEntryImageWarCrimes
ResourceName m_TextureHeaderImageNoWarCrimes
void WarCrimesActive(bool warCriminal)
ref Color m_iWarCrimesHeaderBackgroundColor
void CreateWarCrimeEntry(SCR_EWarCrimes crime)
ResourceName m_TextureHeaderImageWarCrimes
override void HandlerAttached(Widget w)
SCR_FieldOfViewSettings Attribute