Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionShowItemSlotHint.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "Get an item you want to find in player quick slots.")]
5 ref SCR_ScenarioFrameworkGet m_ItemGetter;
6
7 [Attribute()]
8 string m_sItemDescriptionText;
9
10 //------------------------------------------------------------------------------------------------
11 override void ComposeHintText()
12 {
13 m_sText = m_sText + DOUBLE_LINE_SPACE + m_sItemDescriptionText + DOUBLE_LINE_SPACE + string.Format("<action name='%1' scale='1.7'/>", GetQuickSlotAction());
14
15 super.ComposeHintText();
16 }
17
18 //------------------------------------------------------------------------------------------------
19 string GetQuickSlotAction()
20 {
21 IEntity item;
22 if (m_ItemGetter)
23 {
24 SCR_ScenarioFrameworkParam<IEntity> entityWrapper = SCR_ScenarioFrameworkParam<IEntity>.Cast(m_ItemGetter.Get());
25 if (!entityWrapper)
26 return string.Empty;
27
28 item = entityWrapper.GetValue();
29 }
30
32 if (!PlayerInventoryManager)
33 return string.Empty;
34
35 // Index needs to be increased +1 as the slots are numbered 1 to 10.
36 int itemIndex = PlayerInventoryManager.GetEntityIndexInQuickslots(item) +1;
37
38 return "InventoryQuickSlot" + string.ToString(itemIndex);
39 }
40}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external Managed FindComponent(typename typeName)
SCR_FieldOfViewSettings Attribute