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

◆ SwitchPreset()

void SwitchPreset ( )
protected

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

437 {
438 int index;
439 string preset_text;
440 UAInputAPI inputAPI = GetUApi();
441 TextWidget nameWidget;
442
443 index = inputAPI.PresetCurrent() + 1;
444 if (index >= inputAPI.PresetCount())
445 {
446 index = 0;
447 }
448
449 inputAPI.PresetSelect(index);
450 if (Class.CastTo(nameWidget,layoutRoot.FindAnyWidget("PresetText")))
451 {
452 preset_text = inputAPI.PresetName(inputAPI.PresetCurrent());
453 nameWidget.SetText(preset_text);
454 }
455
456 g_Game.GetInput().SetProfile(index);
457 GetUApi().Export();
458 g_Game.GetMission().GetOnInputPresetChanged().Invoke();
459 }
DayZGame g_Game
Определения DayZGame.c:3942
proto native UAInputAPI GetUApi()
Super root of all classes in Enforce script.
Определения EnScript.c:11
Определения 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
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo(), UAInputAPI::Export(), g_Game, GetUApi(), UAInputAPI::PresetCount(), UAInputAPI::PresetCurrent(), UAInputAPI::PresetName() и UAInputAPI::PresetSelect().

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