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_CreationDateTooltipDetail.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
BaseContainerCustomTitleField
(
"m_sDisplayName"
)]
2
class
SCR_CreationDateTooltipDetail
:
SCR_EntityTooltipDetail
3
{
4
[
Attribute
(
"RowHolder"
)]
5
protected
string
m_sRowHolderName
;
6
7
[
Attribute
(defvalue:
"0.5 0.5 0.5 1"
,
desc
:
"Color of Text."
)]
8
protected
ref
Color
m_WidgetColor
;
9
10
[
Attribute
(
"{DAD5433E63B93061}UI/Textures/MainMenu/Icons/EventNotification_64x_UI.edds"
)]
11
protected
ResourceName
m_sCreationDayIcon
;
12
13
[
Attribute
(
"1"
,
desc
:
"If true will show an icon and given text when it is the entities birthday/creation day"
)]
14
protected
bool
m_bShowWidgetOnCreationDay
;
15
16
//------------------------------------------------------------------------------------------------
17
override
bool
CreateDetail
(
SCR_EditableEntityComponent
entity,
Widget
parent,
TextWidget
label,
bool
setFrameslot =
true
)
18
{
19
if
(label)
20
label.SetColor(
m_WidgetColor
);
21
22
return
super.CreateDetail(entity, parent, label, setFrameslot);
23
}
24
25
//------------------------------------------------------------------------------------------------
26
override
bool
InitDetail
(
SCR_EditableEntityComponent
entity,
Widget
widget)
27
{
28
SCR_ExtendedIdentityComponent
extendedIdentityComponent =
SCR_ExtendedIdentityComponent
.Cast(entity.GetOwner().FindComponent(
SCR_ExtendedIdentityComponent
));
29
if
(!extendedIdentityComponent)
30
return
false
;
31
32
//~ Check if allowed to show bio
33
BaseContainer
editorSettings =
GetGame
().GetGameUserSettings().GetModule(
"SCR_EditorSettings"
);
34
bool
showBioTooltip =
true
;
35
36
if
(editorSettings)
37
editorSettings.Get(
"m_bShowIdentityBioTooltip"
, showBioTooltip);
38
39
if
(!showBioTooltip)
40
return
false
;
41
42
SCR_RowTooltipEditorUIComponent
rowTooltip =
SCR_RowTooltipEditorUIComponent
.Cast(widget.FindHandler(
SCR_RowTooltipEditorUIComponent
));
43
if
(!rowTooltip)
44
{
45
Widget
rowHolder = widget.FindAnyWidget(
m_sRowHolderName
);
46
if
(rowHolder)
47
rowTooltip =
SCR_RowTooltipEditorUIComponent
.Cast(rowHolder.FindHandler(
SCR_RowTooltipEditorUIComponent
));
48
49
if
(!rowTooltip)
50
return
false
;
51
}
52
53
SCR_IdentityManagerComponent
identityManager =
SCR_IdentityManagerComponent
.
GetInstance
();
54
if
(!identityManager)
55
return
false
;
56
57
int
currentRowIndex;
58
59
//~ Set date of birth/creation
60
string
format, day, month, age, year;
61
if
(identityManager.
GetCreationdayString
(extendedIdentityComponent, format, day, month, year, age))
62
{
63
//~ Is Birthday/Creation day
64
if
(
m_bShowWidgetOnCreationDay
&& identityManager.
IsCreationDay
(extendedIdentityComponent))
65
{
66
if
(rowTooltip.
AddIcon
(currentRowIndex,
m_sCreationDayIcon
,
m_WidgetColor
))
67
currentRowIndex++;
68
}
69
70
if
(rowTooltip.
AddText
(currentRowIndex, format,
m_WidgetColor
, day, month, year, age))
71
currentRowIndex++;
72
}
73
74
//~ Place of creation
75
SCR_ExtendedIdentity
extendedIdentity = extendedIdentityComponent.
GetExtendedIdentity
();
76
if
(extendedIdentity)
77
{
78
SCR_UIInfo
uiInfo = extendedIdentity.
GetPlaceOfOriginUIInfo
();
79
if
(uiInfo && uiInfo.GetName())
80
{
81
if
(rowTooltip.
AddText
(currentRowIndex, uiInfo.GetName(),
m_WidgetColor
))
82
currentRowIndex++;
83
}
84
}
85
86
return
currentRowIndex > 0;
87
}
88
};
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
BaseContainerCustomTitleField
class SCR_KeyBindingFilter BaseContainerCustomTitleField("m_sBindString")
Definition
SCR_KeyBindingMenuConfig.c:116
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
BaseContainer
Definition
BaseContainer.c:13
Color
Definition
Color.c:13
ResourceName
Definition
ResourceName.c:13
SCR_CreationDateTooltipDetail
Definition
SCR_CreationDateTooltipDetail.c:3
SCR_CreationDateTooltipDetail::m_sCreationDayIcon
ResourceName m_sCreationDayIcon
Definition
SCR_CreationDateTooltipDetail.c:11
SCR_CreationDateTooltipDetail::InitDetail
override bool InitDetail(SCR_EditableEntityComponent entity, Widget widget)
Definition
SCR_CreationDateTooltipDetail.c:26
SCR_CreationDateTooltipDetail::m_sRowHolderName
string m_sRowHolderName
Definition
SCR_CreationDateTooltipDetail.c:5
SCR_CreationDateTooltipDetail::CreateDetail
override bool CreateDetail(SCR_EditableEntityComponent entity, Widget parent, TextWidget label, bool setFrameslot=true)
Definition
SCR_CreationDateTooltipDetail.c:17
SCR_CreationDateTooltipDetail::m_bShowWidgetOnCreationDay
bool m_bShowWidgetOnCreationDay
Definition
SCR_CreationDateTooltipDetail.c:14
SCR_CreationDateTooltipDetail::m_WidgetColor
ref Color m_WidgetColor
Definition
SCR_CreationDateTooltipDetail.c:8
SCR_EditableEntityComponent
Definition
SCR_EditableEntityComponent.c:14
SCR_EntityTooltipDetail
Definition
SCR_EntityTooltipDetail.c:3
SCR_ExtendedIdentityComponent
Definition
SCR_ExtendedIdentityComponent.c:6
SCR_ExtendedIdentityComponent::GetExtendedIdentity
SCR_ExtendedIdentity GetExtendedIdentity()
Definition
SCR_ExtendedIdentityComponent.c:155
SCR_ExtendedIdentity
Definition
SCR_ExtendedIdentity.c:3
SCR_ExtendedIdentity::GetPlaceOfOriginUIInfo
SCR_UIInfo GetPlaceOfOriginUIInfo()
Definition
SCR_ExtendedIdentity.c:191
SCR_IdentityManagerComponent
Definition
SCR_IdentityManagerComponent.c:7
SCR_IdentityManagerComponent::IsCreationDay
bool IsCreationDay(SCR_ExtendedIdentityComponent identityComponent)
Definition
SCR_IdentityManagerComponent.c:327
SCR_IdentityManagerComponent::GetCreationdayString
bool GetCreationdayString(SCR_ExtendedIdentityComponent identityComponent, out string format, out string day, out string month, out string year, out string age)
Definition
SCR_IdentityManagerComponent.c:305
SCR_IdentityManagerComponent::GetInstance
static SCR_IdentityManagerComponent GetInstance()
Definition
SCR_IdentityManagerComponent.c:62
SCR_RowTooltipEditorUIComponent
Definition
SCR_RowTooltipEditorUIComponent.c:2
SCR_RowTooltipEditorUIComponent::AddIcon
bool AddIcon(int rowIndex, ResourceName icon, Color color=null, string setName=string.Empty)
Definition
SCR_RowTooltipEditorUIComponent.c:48
SCR_RowTooltipEditorUIComponent::AddText
bool AddText(int rowIndex, string text, Color color=null, string param1=string.Empty, string param2=string.Empty, string param3=string.Empty, string param4=string.Empty, string param5=string.Empty)
Definition
SCR_RowTooltipEditorUIComponent.c:16
SCR_UIInfo
Definition
SCR_UIInfo.c:8
TextWidget
Definition
TextWidget.c:16
Widget
Definition
Widget.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Editor
UI
Components
Tooltips
Tooltips
Details
SCR_CreationDateTooltipDetail.c
Generated by
1.17.0