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

◆ SwitchPreset()

void SwitchPreset ( )
protected

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

424 {
425 int index;
426 string preset_text;
427 UAInputAPI inputAPI = GetUApi();
428 TextWidget nameWidget;
429
430 index = inputAPI.PresetCurrent() + 1;
431 if (index >= inputAPI.PresetCount())
432 {
433 index = 0;
434 }
435
436 inputAPI.PresetSelect(index);
437 if (Class.CastTo(nameWidget,layoutRoot.FindAnyWidget("PresetText")));
438 {
439 preset_text = inputAPI.PresetName(inputAPI.PresetCurrent());
440 nameWidget.SetText(preset_text);
441 }
442
443 GetGame().GetInput().SetProfile(index);
444 GetUApi().Export();
446 }
proto native UAInputAPI GetUApi()
proto native Input GetInput()
proto native Mission GetMission()
Super root of all classes in Enforce script.
Определения EnScript.c:11
proto native int SetProfile(int index)
setting active profile
ScriptInvoker GetOnInputPresetChanged()
Определения gameplay.c:859
proto void Invoke(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)
invoke call on all inserted methods with given arguments
Определения EnWidgets.c:220
proto native owned string PresetName(int index)
proto native int PresetCurrent()
proto native void PresetSelect(int index)
proto native int PresetCount()
proto native void Export()
Определения UAInput.c:166
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo(), UAInputAPI::Export(), GetGame(), CGame::GetInput(), CGame::GetMission(), Mission::GetOnInputPresetChanged(), GetUApi(), ScriptInvoker::Invoke(), UAInputAPI::PresetCount(), UAInputAPI::PresetCurrent(), UAInputAPI::PresetName(), UAInputAPI::PresetSelect() и Input::SetProfile().

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