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_DeployableHintUIInfo.c
Go to the documentation of this file.
1
[
BaseContainerProps
(configRoot:
true
)]
2
class
SCR_DeployableHintUIInfo
: SCR_InventoryItemHintUIInfo
3
{
4
[
Attribute
(defvalue:
"0"
,
desc
:
"Id of a variant for which this hint should fetch the list of required items"
,
params
:
"0 inf"
)]
5
protected
int
m_iVariantId
;
6
7
[
Attribute
(defvalue:
"0"
,
desc
:
"Never show this hint"
)]
8
protected
bool
m_bHide
;
9
10
//------------------------------------------------------------------------------------------------
11
override
bool
CanBeShown
(
InventoryItemComponent
item,
SCR_InventorySlotUI
focusedSlot)
12
{
13
return
!
m_bHide
&& super.CanBeShown(item, focusedSlot);
14
}
15
16
//------------------------------------------------------------------------------------------------
17
override
bool
SetItemHintNameTo
(
InventoryItemComponent
item,
TextWidget
textWidget)
18
{
19
if
(!textWidget)
20
return
false
;
21
22
textWidget.SetTextWrapping(
false
);
23
return
super.SetItemHintNameTo(item, textWidget);
24
}
25
26
//------------------------------------------------------------------------------------------------
27
override
string
GetItemHintName
(
InventoryItemComponent
item)
28
{
29
IEntity
owner = item.GetOwner();
30
SCR_MultiPartDeployableItemComponent deployableComp = SCR_MultiPartDeployableItemComponent.Cast(owner.
FindComponent
(SCR_MultiPartDeployableItemComponent));
31
if
(!deployableComp)
32
return
string
.Empty;
33
34
SCR_MultiPartDeployableItemComponentClass
data
=
SCR_MultiPartDeployableItemComponentClass
.Cast(deployableComp.GetComponentData(owner));
35
if
(!
data
)
36
return
string
.Empty;
37
38
SCR_DeployableVariantContainer
container =
data
.GetVariantContainer(
m_iVariantId
);
39
if
(!container)
40
string
.Empty;
41
42
array<ref SCR_RequiredDeployablePart> requirements = container.
GetRequiredElementsRaw
();
43
if
(!requirements || requirements.IsEmpty())
44
return
string
.Empty;
45
46
int
numberOfParts;
47
string
element;
48
foreach
(
int
i,
SCR_RequiredDeployablePart
partReq : requirements)
49
{
50
element +=
UIConstants
.RICH_TEXT_LINE_BREAK +
UIConstants
.RICH_TEXT_LIST_POINT +
" "
+ partReq.GetPartName();
51
numberOfParts = partReq.GetNumberOfRequiredPrefabs();
52
if
(numberOfParts > 1)
53
element +=
WidgetManager
.Translate(
" "
+
UIConstants
.VALUE_MUTLIPLIER_SHORT, numberOfParts.ToString());
54
}
55
56
return
WidgetManager
.Translate(
GetName
(), GetDescription(), element);
57
}
58
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
data
Get all prefabs that have the spawner data
Definition
SCR_EntityCatalogManagerComponent.c:320
GetName
string GetName()
Definition
SCR_NotificationSenderComponent.c:15
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
params
category params
Definition
SCR_SpherePointGeneratorPreviewComponent.c:21
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
InventoryItemComponent
Definition
InventoryItemComponent.c:13
SCR_DeployableHintUIInfo
Definition
SCR_DeployableHintUIInfo.c:3
SCR_DeployableHintUIInfo::SetItemHintNameTo
override bool SetItemHintNameTo(InventoryItemComponent item, TextWidget textWidget)
Definition
SCR_DeployableHintUIInfo.c:17
SCR_DeployableHintUIInfo::GetItemHintName
override string GetItemHintName(InventoryItemComponent item)
Definition
SCR_DeployableHintUIInfo.c:27
SCR_DeployableHintUIInfo::m_bHide
bool m_bHide
Definition
SCR_DeployableHintUIInfo.c:8
SCR_DeployableHintUIInfo::CanBeShown
override bool CanBeShown(InventoryItemComponent item, SCR_InventorySlotUI focusedSlot)
Definition
SCR_DeployableHintUIInfo.c:11
SCR_DeployableHintUIInfo::m_iVariantId
int m_iVariantId
Definition
SCR_DeployableHintUIInfo.c:5
SCR_DeployableVariantContainer
Definition
SCR_DeployableVariantContainer.c:2
SCR_DeployableVariantContainer::GetRequiredElementsRaw
array< ref SCR_RequiredDeployablePart > GetRequiredElementsRaw()
Returns pointer to a shared array of requirements.
Definition
SCR_DeployableVariantContainer.c:72
SCR_InventorySlotUI
Definition
SCR_InventorySlotUI.c:26
SCR_MultiPartDeployableItemComponentClass
Definition
SCR_MultiPartDeployableItemComponent.c:3
SCR_RequiredDeployablePart
Definition
SCR_RequiredDeployablePart.c:2
TextWidget
Definition
TextWidget.c:16
UIConstants
Definition
Constants.c:151
WidgetManager
Definition
WidgetManager.c:16
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Editor
Containers
UIInfo
SCR_DeployableHintUIInfo.c
Generated by
1.17.0