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_InventoryItemHintUIInfo.c
Go to the documentation of this file.
1
enum
SCR_EInventoryHintInputDevice
2
{
3
ANY
= 0,
4
KEYBOARD_MOUSE_ONLY
,
5
GAMEPAD_ONLY
,
6
}
7
8
[
BaseContainerProps
()]
9
class
SCR_InventoryItemHintUIInfo :
SCR_ColorUIInfo
10
{
11
[
Attribute
(
SCR_EInventoryHintInputDevice
.ANY.ToString(),
desc
:
"Show hint depending on input device"
, uiwidget: UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(
SCR_EInventoryHintInputDevice
))]
12
protected
SCR_EInventoryHintInputDevice
m_eShowWithInputDevice;
13
14
[
Attribute
(
"0"
,
desc
:
"If true than will never show this hint when item is in arsenal"
)]
15
protected
bool
m_bHideInArsenal;
16
17
protected
SCR_InventorySlotUI m_LastFocusedSlot;
18
19
//------------------------------------------------------------------------------------------------
24
bool
CanBeShown
(InventoryItemComponent item, SCR_InventorySlotUI focusedSlot)
25
{
26
m_LastFocusedSlot = focusedSlot;
27
28
//~ Make sure it is not shown if stored in arsenal
29
if
(m_bHideInArsenal && SCR_ArsenalInventorySlotUI.Cast(focusedSlot))
30
return
false
;
31
32
switch
(m_eShowWithInputDevice)
33
{
34
case
SCR_EInventoryHintInputDevice
.ANY:
35
return
true
;
36
case
SCR_EInventoryHintInputDevice
.KEYBOARD_MOUSE_ONLY:
37
return
GetGame
().GetInputManager().IsUsingMouseAndKeyboard();
38
case
SCR_EInventoryHintInputDevice
.GAMEPAD_ONLY:
39
return
!
GetGame
().GetInputManager().IsUsingMouseAndKeyboard();
40
}
41
42
return
true
;
43
}
44
45
//------------------------------------------------------------------------------------------------
46
override
bool
SetIconTo(ImageWidget imageWidget)
47
{
48
if
(!imageWidget)
49
return
false
;
50
51
if
(!super.SetIconTo(imageWidget))
52
{
53
imageWidget.SetOpacity(0);
54
return
false
;
55
}
56
57
imageWidget.SetColor(
GetColor
());
58
return
true
;
59
}
60
61
//------------------------------------------------------------------------------------------------
66
bool
SetItemHintNameTo(InventoryItemComponent item, TextWidget textWidget)
67
{
68
if
(!textWidget)
69
return
false
;
70
71
textWidget.SetText(GetItemHintName(item));
72
return
true
;
73
}
74
75
//------------------------------------------------------------------------------------------------
77
string
GetItemHintName(InventoryItemComponent item)
78
{
79
return
GetName
();
80
}
81
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
CanBeShown
bool CanBeShown(notnull SCR_EditorContentBrowserSaveStateDataUI tab)
Check if the given tab can be shown.
Definition
SCR_CampaignBuildingEditorComponent.c:321
GetColor
Color GetColor()
Definition
SCR_EditableCommentComponent.c:52
SCR_EInventoryHintInputDevice
SCR_EInventoryHintInputDevice
Definition
SCR_InventoryItemHintUIInfo.c:2
KEYBOARD_MOUSE_ONLY
@ KEYBOARD_MOUSE_ONLY
Definition
SCR_InventoryItemHintUIInfo.c:4
GAMEPAD_ONLY
@ GAMEPAD_ONLY
Definition
SCR_InventoryItemHintUIInfo.c:5
GetName
string GetName()
Definition
SCR_NotificationSenderComponent.c:15
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
SCR_ColorUIInfo
Definition
SCR_ColorUIInfo.c:3
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
ANY
@ ANY
Will list all servers regardless platform compatibility.
Definition
EnScript.c:8
scripts
Game
Editor
Containers
UIInfo
SCR_InventoryItemHintUIInfo.c
Generated by
1.17.0