Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_NearbyContextCachingConfig.c
Go to the documentation of this file.
1[BaseContainerProps(configRoot: true)]
3{
4 [Attribute()]
5 protected ref array<ref SCR_NearbyContextCachingData> m_aCachedWidgets;
7 //------------------------------------------------------------------------------------------------
10 void GetCachedLayouts(out array<SCR_NearbyContextCachingData> cachedLayouts)
11 {
12 foreach (SCR_NearbyContextCachingData data : m_aCachedWidgets)
13 {
14 if (data)
15 cachedLayouts.Insert(data);
16 }
17 }
18
19 //------------------------------------------------------------------------------------------------
23 SCR_NearbyContextCachingData GetDataFromLayout(ResourceName layout)
24 {
25 SCR_NearbyContextCachingData returnData;
26 foreach (SCR_NearbyContextCachingData data : m_aCachedWidgets)
27 {
28 ResourceName dataLayout;
29 data.GetLayout(dataLayout);
30
31 if (dataLayout == layout)
32 {
33 returnData = data;
34 break;
35 }
36 }
37
38 return returnData;
39 }
40}
41
43class SCR_NearbyContextCachingData
44{
45 [Attribute(desc: "The Name is just used for organization reasons in the Config")]
46 protected string m_sName;
47
48 [Attribute("", UIWidgets.ResourceNamePicker, "Layout that should be cached", "layout")]
49 protected ResourceName m_sLayout;
50
51 [Attribute("5", desc: "Amount of Widgets that should be created and cached on Game start.")]
52 protected int m_iPrecacheAmount;
53
54 [Attribute("5", desc: "Max amount of Cached widgets. If more widgets are needed they will be created but not cached and deleted after not being used anymore.")]
55 protected int m_iMaxCachedAmount;
56
57 //------------------------------------------------------------------------------------------------
60 void GetLayout(out ResourceName layout)
61 {
62 layout = m_sLayout;
63 }
64
65 //------------------------------------------------------------------------------------------------
68 void GetPrecacheAmount(out int amount)
69 {
70 amount = m_iPrecacheAmount;
71 }
72
73 //------------------------------------------------------------------------------------------------
77 void GetMaxCacheAmount(out int amount)
78 {
79 amount = m_iMaxCachedAmount;
80 }
81}
82
84{
85 //------------------------------------------------------------------------------------------------
86 override bool _WB_GetCustomTitle(BaseContainer source, out string title)
87 {
88 // Make sure variable exists
89 int index = source.GetVarIndex("m_sName");
90 if (index == -1)
91 return false;
92
93 source.Get("m_sName", title);
94
95 return true;
96 }
97}
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
Get all prefabs that have the spawner data
UI layouts Menus CleanSweep CleanSweepAreaSelection layout
LocalizedString m_sName
class SCR_NearbyContextCachingConfig BaseContainerProps()
class SCR_NearbyContextCachingConfig SCR_NearbyContextTitle()] class SCR_NearbyContextCachingData
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void GetCachedLayouts(out array< SCR_NearbyContextCachingData > cachedLayouts)
ref array< ref SCR_NearbyContextCachingData > m_aCachedWidgets
SCR_NearbyContextCachingData GetDataFromLayout(ResourceName layout)
SCR_FieldOfViewSettings Attribute