Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_ButtonEffectImage.c
Go to the documentation of this file.
1
2
[
BaseContainerProps
(configRoot :
true
), SCR_ButtonEffectTitleAttribute(
"Image"
,
"m_sWidgetName"
)]
3
class
SCR_ButtonEffectImage
: SCR_ButtonEffectWidgetBase
4
{
5
[
Attribute
(
""
,
UIWidgets
.ResourceNamePicker,
"Common image set"
,
"imageset"
)]
6
ResourceName
m_ImageSet;
7
8
[
Attribute
()]
9
ref SCR_ButtonEffectImage_ImageOrImageSet m_Default;
10
11
[
Attribute
()]
12
ref SCR_ButtonEffectImage_ImageOrImageSet m_Hovered;
13
14
[
Attribute
()]
15
ref SCR_ButtonEffectImage_ImageOrImageSet m_Activated;
16
17
[
Attribute
()]
18
ref SCR_ButtonEffectImage_ImageOrImageSet m_ActivatedHovered;
19
20
[
Attribute
()]
21
ref SCR_ButtonEffectImage_ImageOrImageSet m_Disabled;
22
23
[
Attribute
()]
24
ref SCR_ButtonEffectImage_ImageOrImageSet m_DisabledActivated;
25
26
[
Attribute
()]
27
ref SCR_ButtonEffectImage_ImageOrImageSet m_FocusGained;
28
29
[
Attribute
()]
30
ref SCR_ButtonEffectImage_ImageOrImageSet m_FocusLost;
31
32
[
Attribute
()]
33
ref SCR_ButtonEffectImage_ImageOrImageSet m_ToggledOn;
34
35
[
Attribute
()]
36
ref SCR_ButtonEffectImage_ImageOrImageSet m_ToggledOff;
37
38
//-------------------------------------------------------------------------------------------
39
override
void
OnStateDefault(
bool
instant)
40
{
41
Apply
(m_Default);
42
}
43
44
//-------------------------------------------------------------------------------------------
45
override
void
OnStateHovered(
bool
instant)
46
{
47
Apply
(m_Hovered);
48
}
49
50
//-------------------------------------------------------------------------------------------
51
override
void
OnStateActivated(
bool
instant)
52
{
53
Apply
(m_Activated);
54
}
55
56
//-------------------------------------------------------------------------------------------
57
override
void
OnStateActivatedHovered(
bool
instant)
58
{
59
Apply
(m_ActivatedHovered);
60
}
61
62
//-------------------------------------------------------------------------------------------
63
override
void
OnStateDisabled(
bool
instant)
64
{
65
Apply
(m_Disabled);
66
}
67
68
//-------------------------------------------------------------------------------------------
69
override
void
OnStateDisabledActivated(
bool
instant)
70
{
71
Apply
(m_DisabledActivated);
72
}
73
74
//-------------------------------------------------------------------------------------------
75
override
void
OnFocusGained(
bool
instant)
76
{
77
Apply
(m_FocusGained);
78
}
79
80
//-------------------------------------------------------------------------------------------
81
override
void
OnFocusLost(
bool
instant)
82
{
83
Apply
(m_FocusLost);
84
}
85
86
//-------------------------------------------------------------------------------------------
87
override
void
OnToggledOn(
bool
instant)
88
{
89
Apply
(m_ToggledOn);
90
}
91
92
//-------------------------------------------------------------------------------------------
93
override
void
OnToggledOff(
bool
instant)
94
{
95
Apply
(m_ToggledOff);
96
}
97
98
//-------------------------------------------------------------------------------------------
99
protected
void
Apply
(SCR_ButtonEffectImage_ImageOrImageSet imgSpec)
100
{
101
ImageWidget
w =
ImageWidget
.Cast(m_wTarget);
102
103
if
(!w || !imgSpec)
104
return
;
105
106
if
(!imgSpec.m_ImageName.IsEmpty() && !imgSpec.m_ImageOrImageSet.IsEmpty())
107
w.LoadImageFromSet(0, imgSpec.m_ImageOrImageSet, imgSpec.m_ImageName);
108
else
if
(!imgSpec.m_ImageName.IsEmpty() && !m_ImageSet.IsEmpty())
109
w.LoadImageFromSet(0, m_ImageSet, imgSpec.m_ImageName);
110
else
if
(!imgSpec.m_ImageName.IsEmpty())
111
w.LoadImageTexture(0, imgSpec.m_ImageOrImageSet);
112
}
113
}
114
115
[
BaseContainerProps
()]
116
class
SCR_ButtonEffectImage_ImageOrImageSet
117
{
118
[
Attribute
()]
119
ResourceName
m_ImageOrImageSet;
120
121
[
Attribute
()]
122
string
m_ImageName;
123
124
//------------------------------------------------------------------------------------------------
125
// constructor
128
void
SCR_ButtonEffectImage_ImageOrImageSet(
ResourceName
resource =
string
.Empty,
string
imageName =
string
.Empty)
129
{
130
if
(!resource.IsEmpty())
131
m_ImageOrImageSet = resource;
132
133
if
(!imageName.IsEmpty())
134
m_ImageName = imageName;
135
}
136
}
BaseContainerProps
SCR_ButtonEffectImage SCR_ButtonEffectWidgetBase BaseContainerProps()] class SCR_ButtonEffectImage_ImageOrImageSet
Definition
SCR_ButtonEffectImage.c:115
ImageWidget
Definition
ImageWidget.c:13
ResourceName
Definition
ResourceName.c:13
SCR_ButtonEffectImage
This effect modifies texture of an image.
Definition
SCR_ButtonEffectImage.c:4
SCR_ButtonEffectImage::Apply
void Apply(SCR_ButtonEffectImage_ImageOrImageSet imgSpec)
Definition
SCR_ButtonEffectImage.c:99
UIWidgets
Definition
attributes.c:40
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
UI
Components
ButtonComponents
ModularButton
Effects
SCR_ButtonEffectImage.c
Generated by
1.17.0