Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ActionUIInfo.c
Go to the documentation of this file.
2{
3 [Attribute(UIConstants.ICONS_IMAGE_SET, UIWidgets.ResourcePickerThumbnail)]
5
6 [Attribute(UIConstants.ICONS_GLOW_IMAGE_SET, UIWidgets.ResourcePickerThumbnail)]
8
9 [Attribute(desc: "If 'Icon' is an ImageSet, define the name of the wanted Icon here.")]
10 protected string m_sIconName;
11
12 //------------------------------------------------------------------------------------------------
17 bool SetIconTo(ImageWidget imageWidget, ImageWidget glowWidget = null)
18 {
19 if (!imageWidget)
20 return false;
21
22 bool interactionIconEmpty = m_sInteractionIcon.IsEmpty();
23 if (interactionIconEmpty || (!interactionIconEmpty && m_sIconName.IsEmpty()))
24 return false;
25
26 string ext;
27 FilePath.StripExtension(m_sInteractionIcon, ext);
28 if (ext == "imageset")
29 {
30 imageWidget.LoadImageFromSet(0, m_sInteractionIcon, m_sIconName);
31
32 if (glowWidget)
33 glowWidget.LoadImageFromSet(0, m_sInteractionGlowIcon, m_sIconName);
34 }
35 else
36 {
37 imageWidget.LoadImageTexture(0, m_sInteractionIcon);
38
39 if (glowWidget)
40 glowWidget.LoadImageTexture(0, m_sInteractionGlowIcon);
41 }
42
43 return true;
44 }
45
46 //------------------------------------------------------------------------------------------------
50 {
51 m_sInteractionIcon = imageset;
52 }
53
54 //------------------------------------------------------------------------------------------------
57 string GetIconName()
58 {
59 return m_sIconName;
60 }
61}
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void SetImageSet(ResourceName imageset)
ResourceName m_sInteractionGlowIcon
bool SetIconTo(ImageWidget imageWidget, ImageWidget glowWidget=null)
ResourceName m_sInteractionIcon
UIInfo - allows to define UI elements.
Definition UIInfo.c:14
SCR_FieldOfViewSettings Attribute