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_ToolbarItemNotificationEditorUIComponent.c
Go to the documentation of this file.
1
class
SCR_ToolbarItemNotificationEditorUIComponent
:
ScriptedWidgetComponent
2
{
3
[
Attribute
(
"Icon"
)]
4
protected
string
m_sIconWidgetName
;
5
6
[
Attribute
(
"Number"
)]
7
protected
string
m_sNumberWidgetName
;
8
9
[
Attribute
()]
10
protected
ResourceName
m_sDefaultIcon
;
11
12
protected
Widget
m_root
;
13
protected
ImageWidget
m_IconWidget
;
14
protected
TextWidget
m_NumberWidget
;
15
16
//------------------------------------------------------------------------------------------------
19
void
SetNotification
(
int
number,
SCR_UIInfo
info = null)
20
{
21
//Hide
22
if
(number <= 0)
23
{
24
m_root
.SetVisible(
false
);
25
}
26
//Custom image if one notification
27
else
if
(number == 1 && info && info.SetIconTo(
m_IconWidget
))
28
{
29
m_NumberWidget
.SetVisible(
false
);
30
m_root
.SetVisible(
true
);
31
}
32
//Default icon
33
else
34
{
35
m_IconWidget
.LoadImageTexture(0,
m_sDefaultIcon
);
36
m_IconWidget
.SetImage(0);
37
m_NumberWidget
.SetText(number.ToString());
38
m_NumberWidget
.SetVisible(
true
);
39
m_root
.SetVisible(
true
);
40
}
41
}
42
43
//------------------------------------------------------------------------------------------------
44
override
void
HandlerAttached
(
Widget
w)
45
{
46
m_root
= w;
47
m_IconWidget
=
ImageWidget
.Cast(w.FindAnyWidget(
m_sIconWidgetName
));
48
m_NumberWidget
=
TextWidget
.Cast(w.FindAnyWidget(
m_sNumberWidgetName
));
49
m_root
.SetVisible(
false
);
50
}
51
}
ImageWidget
Definition
ImageWidget.c:13
ResourceName
Definition
ResourceName.c:13
SCR_ToolbarItemNotificationEditorUIComponent
Definition
SCR_ToolbarItemNotificationEditorUIComponent.c:2
SCR_ToolbarItemNotificationEditorUIComponent::HandlerAttached
override void HandlerAttached(Widget w)
Definition
SCR_ToolbarItemNotificationEditorUIComponent.c:44
SCR_ToolbarItemNotificationEditorUIComponent::m_root
Widget m_root
Definition
SCR_ToolbarItemNotificationEditorUIComponent.c:12
SCR_ToolbarItemNotificationEditorUIComponent::m_sIconWidgetName
string m_sIconWidgetName
Definition
SCR_ToolbarItemNotificationEditorUIComponent.c:4
SCR_ToolbarItemNotificationEditorUIComponent::m_sNumberWidgetName
string m_sNumberWidgetName
Definition
SCR_ToolbarItemNotificationEditorUIComponent.c:7
SCR_ToolbarItemNotificationEditorUIComponent::SetNotification
void SetNotification(int number, SCR_UIInfo info=null)
Definition
SCR_ToolbarItemNotificationEditorUIComponent.c:19
SCR_ToolbarItemNotificationEditorUIComponent::m_IconWidget
ImageWidget m_IconWidget
Definition
SCR_ToolbarItemNotificationEditorUIComponent.c:13
SCR_ToolbarItemNotificationEditorUIComponent::m_NumberWidget
TextWidget m_NumberWidget
Definition
SCR_ToolbarItemNotificationEditorUIComponent.c:14
SCR_ToolbarItemNotificationEditorUIComponent::m_sDefaultIcon
ResourceName m_sDefaultIcon
Definition
SCR_ToolbarItemNotificationEditorUIComponent.c:10
SCR_UIInfo
Definition
SCR_UIInfo.c:8
ScriptedWidgetComponent
Definition
ScriptedWidgetComponent.c:13
TextWidget
Definition
TextWidget.c:16
Widget
Definition
Widget.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Editor
UI
Components
Toolbar
Items
ItemNotifications
SCR_ToolbarItemNotificationEditorUIComponent.c
Generated by
1.17.0