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

◆ GetComboButtonNamesFromInput()

static map< int, ref TStringArray > InputUtils::GetComboButtonNamesFromInput ( string pInputName,
int pInputDeviceType )
inlinestaticprotected

returns a map of button names, combo or not

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

34 {
35 UAInput inp = GetUApi().GetInputByName(pInputName);
36 TStringArray buttons;
37 map<int,ref TStringArray> output;//<alternativeIDX<button_array>>
38 for (int i = 0; i < inp.AlternativeCount(); i++)
39 {
40 inp.SelectAlternative(i);
41 if (inp.BindingCount() > 0 && inp.Binding(0) != 0 && inp.CheckBindDevice(0,pInputDeviceType))
42 {
43 buttons = new TStringArray;
44 if (inp.IsCombo())
45 {
46 buttons.Insert(GetUApi().GetButtonName( inp.Binding(0) ));
47
48 for (int j = 1; j < inp.BindingCount(); j++)
49 {
50 if (inp.Binding(j) != 0 && inp.CheckBindDevice(j,pInputDeviceType))
51 {
52 buttons.Insert(GetUApi().GetButtonName( inp.Binding(j) ));
53 }
54 }
55 //return buttons;
56 }
57 else
58 {
59 buttons.Insert(GetUApi().GetButtonName(inp.GetBindKey(0)));
60 //return buttons;
61 }
62
63 if (buttons.Count() > 0)
64 {
65 if (!output)
66 {
67 output = new map<int,ref TStringArray>;
68 }
69 output.Insert(i,buttons);
70 }
71 }
72 }
73
74 return output;
75 }
map
Определения ControlsXboxNew.c:4
proto native UAInputAPI GetUApi()
proto native int Binding(int iIndex)
proto native int BindingCount()
proto native int AlternativeCount()
proto native UAInput GetInputByName(string sInputName)
proto native void SelectAlternative(int iIndex)
proto native int GetBindKey(int iIndex)
proto native bool IsCombo()
proto native bool CheckBindDevice(int iIndex, int iDeviceFlags)
array< string > TStringArray
Определения EnScript.c:685

Перекрестные ссылки UAInput::AlternativeCount(), UAInput::Binding(), UAInput::BindingCount(), UAInput::CheckBindDevice(), UAInput::GetBindKey(), UAInputAPI::GetInputByName(), GetUApi(), UAInput::IsCombo() и UAInput::SelectAlternative().

Используется в GetBoundButtonText().