4 static const string PRESET_OLD =
"#STR_UAPRESET_0";
5 static const string PRESET_NEW =
"#STR_UAPRESET_1";
6 static const int VARIANT_OLD = 0;
7 static const int VARIANT_NEW = 1;
8 static int m_CurrentPresetIDConsole = -1;
20 for (
int i = 0; i < inp.AlternativeCount(); i++)
22 inp.SelectAlternative(i);
23 if (inp.CheckBindDevice(0, pInputDeviceType))
25 return GetUApi().GetButtonName(inp.GetBindKey(0));
38 for (
int i = 0; i < inp.AlternativeCount(); i++)
40 inp.SelectAlternative(i);
41 if (inp.BindingCount() > 0 && inp.Binding(0) != 0 && inp.CheckBindDevice(0,pInputDeviceType))
46 buttons.Insert(
GetUApi().GetButtonName( inp.Binding(0) ));
48 for (
int j = 1; j < inp.BindingCount(); j++)
50 if (inp.Binding(j) != 0 && inp.CheckBindDevice(j,pInputDeviceType))
52 buttons.Insert(
GetUApi().GetButtonName( inp.Binding(j) ));
59 buttons.Insert(
GetUApi().GetButtonName(inp.GetBindKey(0)));
63 if (buttons.Count() > 0)
69 output.Insert(i,buttons);
81 for (
int i = 0; i < pInput.AlternativeCount(); i++)
83 pInput.SelectAlternative(i);
85 for (
int bk = 0; bk < pInput.BindKeyCount(); bk++)
87 if (pInput.CheckBindDevice(0, pInputDeviceType))
89 buttonIcons.Insert(
GetUApi().GetButtonIcon(pInput.Binding(bk)));
91 if (bk == pInput.BindKeyCount() - 1)
100 buttonIcons.Invert();
121 if (buttons.Count() == 0 )
126 for (
int i = 0; i < buttons.Count(); i++)
129 buttons.Get(i).Split(
":", parts);
131 if (parts.Count() < 2)
136 pImageSet.Insert(parts[1].SubstringInverted(parts[1], parts[1].Length() - 6, parts[1].Length()));
143 if (parts[2] ==
"cross")
149 if (parts[2] ==
"circle")
156 pIconName.Insert(parts[2]);
173 if (imageSets.Count() == 0)
178 string result =
string.Format(
"<image set=\"%1\" name=\"%2\" scale=\"%3\" />", imageSets.Get(0), iconNames.Get(0), pScale);
180 string divider =
" ";
183 divider =
string.Format(
"\n%1\n", divider);
186 if (imageSets.Count() > 1)
189 for (
int i = 1; i < imageSets.Count(); i++)
191 result =
string.Format(
"%1%2<image set=\"%3\" name=\"%4\" scale=\"%5\" />", result, divider, imageSets.Get(i), iconNames.Get(i), pScale);
195 return string.Format(
"%1 %2", result, pLocalizedDescription);
212 GetGame().GetInput().GetProfileName(
GetUApi().PresetCurrent(), profile_name);
214 if (profile_name == PRESET_OLD)
216 m_CurrentPresetIDConsole = VARIANT_OLD;
220 m_CurrentPresetIDConsole = VARIANT_NEW;
226 return m_CurrentPresetIDConsole;
254 for (
int i = 0; i <
GetUApi().SortingCount(); i++)
261 inp =
GetUApi().GetInputByID(input_id);
262 if (inp.HasSorting(i))
264 sorting_content.Insert(input_id);
265 sorted_actions.Insert(input_id);
269 if (sorting_content.Count() > 0)
271 sorting_content.Sort();
277 int count = sorted_actions.Count();
278 for (i = 0; i < count; i++)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
array< string > TStringArray