DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ InitInputMetadata()

static bool InputUtils::InitInputMetadata ( )
inlinestaticprotected

См. определение в файле InputUtils.c строка 239

240 {
242 {
244
245 TIntArray sorted_actions = new TIntArray;
247 {
248 m_UnsortedInputActions = new array<int>;
249 }
251
252 UAInput inp;
253
254 for (int i = 0; i < GetUApi().SortingCount(); i++)
255 {
256 int input_id;
257 array<int> sorting_content = new array<int>;
258 for (int j = 0; j < m_UnsortedInputActions.Count(); j++)
259 {
260 input_id = m_UnsortedInputActions[j];
261 inp = GetUApi().GetInputByID(input_id);
262 if (inp.HasSorting(i))
263 {
264 sorting_content.Insert(input_id);
265 sorted_actions.Insert(input_id);
266 }
267 }
268
269 if (sorting_content.Count() > 0)
270 {
271 sorting_content.Sort();
272 m_InputActionSortingMap.Insert(i,sorting_content);
273 }
274 }
275
276 //remove sorted used inputs
277 int count = sorted_actions.Count();
278 for (i = 0; i < count; i++)
279 {
280 m_UnsortedInputActions.RemoveItem(sorted_actions[i]);
281 }
282 return true;
283 }
284 return false;
285 }
map
Определения ControlsXboxNew.c:4
proto native UAInputAPI GetUApi()
ref map< int, ref array< int > > m_InputActionSortingMap
Определения InputUtils.c:11
ref array< int > m_UnsortedInputActions
Определения InputUtils.c:12
proto native UAInput GetInputByID(int iID)
returns list of all bindable (i.e. visible) inputs from the active group ('core' by default)
proto native int SortingCount()
proto native void GetActiveInputs(out TIntArray items)
proto native bool HasSorting(int iIndex)
array< int > TIntArray
Определения EnScript.c:687

Перекрестные ссылки UAInputAPI::GetActiveInputs(), UAInputAPI::GetInputByID(), GetUApi(), UAInput::HasSorting(), m_InputActionSortingMap, m_UnsortedInputActions и UAInputAPI::SortingCount().

Используется в UIScriptedMenu::InitInputSortingMap().