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_NotificationsLogDisplay.c
Go to the documentation of this file.
1
/*
2
Handles the SCR_NotificationsLogComponent when Player is initialized.
3
*/
4
class
SCR_NotificationsLogDisplay
: SCR_InfoDisplayExtended
5
{
6
[
Attribute
(
desc
:
"Should the Notifications go from top to bottom instead of bottom to top?"
)]
7
protected
bool
m_bInsertFromTop
;
8
9
protected
SCR_NotificationsLogComponent
m_NotificationsHud
;
10
protected
SCR_InfoDisplaySlotHandler
m_slotHandler
;
11
protected
SCR_HUDSlotUIComponent
m_HUDSlotComponent
;
12
/*
13
Sets the height of 1 notification to the available spac in the slot can be set correctly.
14
!CANNOT BE 0!
15
*/
16
protected
const
int
HEIGHT_DIVIDER
= 50;
17
18
//------------------------------------------------------------------------------------------------
19
override
void
DisplayStartDraw
(
IEntity
owner)
20
{
21
if
(!
m_wRoot
)
22
return
;
23
24
m_NotificationsHud
=
SCR_NotificationsLogComponent
.Cast(
m_wRoot
.FindHandler(
SCR_NotificationsLogComponent
));
25
26
m_slotHandler
=
SCR_InfoDisplaySlotHandler
.Cast(
GetHandler
(
SCR_InfoDisplaySlotHandler
));
27
if
(!
m_slotHandler
)
28
return
;
29
30
m_HUDSlotComponent
=
m_slotHandler
.GetSlotUIComponent();
31
if
(!
m_HUDSlotComponent
)
32
return
;
33
34
m_HUDSlotComponent
.GetOnResize().Insert(
OnSlotUIResize
);
35
}
36
37
//------------------------------------------------------------------------------------------------
38
override
void
DisplayStopDraw
(
IEntity
owner)
39
{
40
// Assign it again in case the SlotUIComponent has changed
41
m_HUDSlotComponent
=
m_slotHandler
.GetSlotUIComponent();
42
if
(!
m_HUDSlotComponent
)
43
return
;
44
45
m_HUDSlotComponent
.GetOnResize().Remove(
OnSlotUIResize
);
46
}
47
48
//------------------------------------------------------------------------------------------------
49
override
void
DisplayUpdate
(
IEntity
owner,
float
timeSlice)
50
{
51
if
(
m_HUDSlotComponent
!=
m_slotHandler
.GetSlotUIComponent())
52
{
53
if
(
m_HUDSlotComponent
)
54
m_HUDSlotComponent
.GetOnResize().Remove(
OnSlotUIResize
);
55
56
m_HUDSlotComponent
=
m_slotHandler
.GetSlotUIComponent();
57
if
(!
m_HUDSlotComponent
)
58
return
;
59
60
m_HUDSlotComponent
.GetOnResize().Insert(
OnSlotUIResize
);
61
}
62
}
63
64
//------------------------------------------------------------------------------------------------
66
void
OnSlotUIResize
()
67
{
68
// Assign it again in case the SlotUIComponent has changed
69
m_HUDSlotComponent
=
m_slotHandler
.GetSlotUIComponent();
70
if
(!
m_HUDSlotComponent
)
71
return
;
72
73
int
maxNotifications = (
int
)
m_HUDSlotComponent
.GetHeight() /
HEIGHT_DIVIDER
;
74
if
(maxNotifications < 1)
75
maxNotifications = 1;
76
77
m_NotificationsHud
.OnSlotResize(maxNotifications);
78
m_NotificationsHud
.ChangeInsertOrder(
m_bInsertFromTop
);
79
}
80
}
m_wRoot
Widget m_wRoot
Definition
SCR_GameModeCleanSweep.c:25
GetHandler
SCR_InfoDisplayHandler GetHandler(typename handlerType)
Definition
SCR_InfoDisplay.c:80
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
IEntity
Definition
IEntity.c:13
SCR_HUDSlotUIComponent
Definition
SCR_HUDSlotUIComponent.c:6
SCR_InfoDisplaySlotHandler
Definition
SCR_InfoDisplaySlotHandler.c:3
SCR_NotificationsLogComponent
Definition
SCR_NotificationsLogUIComponent.c:7
SCR_NotificationsLogDisplay
Definition
SCR_NotificationsLogDisplay.c:5
SCR_NotificationsLogDisplay::m_slotHandler
SCR_InfoDisplaySlotHandler m_slotHandler
Definition
SCR_NotificationsLogDisplay.c:10
SCR_NotificationsLogDisplay::m_NotificationsHud
SCR_NotificationsLogComponent m_NotificationsHud
Definition
SCR_NotificationsLogDisplay.c:9
SCR_NotificationsLogDisplay::DisplayUpdate
override void DisplayUpdate(IEntity owner, float timeSlice)
Definition
SCR_NotificationsLogDisplay.c:49
SCR_NotificationsLogDisplay::OnSlotUIResize
void OnSlotUIResize()
Calculate the amount of lines that can be displayed dependent on how much space the Layout has.
Definition
SCR_NotificationsLogDisplay.c:66
SCR_NotificationsLogDisplay::DisplayStartDraw
override void DisplayStartDraw(IEntity owner)
Definition
SCR_NotificationsLogDisplay.c:19
SCR_NotificationsLogDisplay::m_HUDSlotComponent
SCR_HUDSlotUIComponent m_HUDSlotComponent
Definition
SCR_NotificationsLogDisplay.c:11
SCR_NotificationsLogDisplay::HEIGHT_DIVIDER
const int HEIGHT_DIVIDER
Definition
SCR_NotificationsLogDisplay.c:16
SCR_NotificationsLogDisplay::DisplayStopDraw
override void DisplayStopDraw(IEntity owner)
Definition
SCR_NotificationsLogDisplay.c:38
SCR_NotificationsLogDisplay::m_bInsertFromTop
bool m_bInsertFromTop
Definition
SCR_NotificationsLogDisplay.c:7
int
Definition
int.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
UI
HUD
SCR_NotificationsLogDisplay.c
Generated by
1.17.0