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

◆ GetRichtextButtonIconFromInputAction() [1/2]

static string InputUtils::GetRichtextButtonIconFromInputAction ( notnull UAInput pInput,
string pLocalizedDescription,
int pInputDeviceType = EUAINPUT_DEVICE_CONTROLLER,
float pScale = ICON_SCALE_NORMAL,
bool pVertical = false )
inlinestaticprotected

first element is already taken

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

168 {
169 array<string> imageSets = new array<string>();
170 array<string> iconNames = new array<string>();
171 InputUtils.GetImagesetAndIconFromInputAction(pInput, pInputDeviceType, imageSets, iconNames);
172
173 if (imageSets.Count() == 0)
174 {
175 return "";
176 }
177
178 string result = string.Format("<image set=\"%1\" name=\"%2\" scale=\"%3\" />", imageSets.Get(0), iconNames.Get(0), pScale);
179
180 string divider = " ";
181 if (pVertical)
182 {
183 divider = string.Format("\n%1\n", divider);
184 }
185
186 if (imageSets.Count() > 1)
187 {
189 for (int i = 1; i < imageSets.Count(); i++)
190 {
191 result = string.Format("%1%2<image set=\"%3\" name=\"%4\" scale=\"%5\" />", result, divider, imageSets.Get(i), iconNames.Get(i), pScale);
192 }
193 }
194
195 return string.Format("%1 %2", result, pLocalizedDescription);
196 }
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.

Перекрестные ссылки string::Format(), GetImagesetAndIconFromInputAction() и ICON_SCALE_NORMAL.

Используется в GetRichtextButtonIconFromInputAction(), Init(), LoginScreenBase::Init(), UIScriptedMenu::Init(), Inventory(), UIScriptedMenu::OnInputDeviceChanged(), ActionTargetsCursor::SetControllerIcon(), ScriptedWidgetEventHandler::SetControllerIcon(), ScriptedWidgetEventHandler::UpdateControlsElements(), UIScriptedMenu::UpdateControlsElements(), WarningMenuBase::UpdateControlsElements() и UIScriptedMenu::UpdateInfoPanelText().