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

◆ InitPresets()

void UIScriptedMenu::InitPresets ( int index,
Widget parent,
Input input )
inlineprotected

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

469 {
470 Widget kb_root = parent.FindAnyWidget("keyboard_dropown");
471 if (kb_root)
472 {
473 kb_root.Show(false);
474 }
475
476 array<string> opt1 = new array<string>;
477 string profile_text;
478
479 for (int i = 0; i < input.GetProfilesCount(); i++)
480 {
481 input.GetProfileName(i, profile_text);
482 opt1.Insert(profile_text);
483 }
484
485 int current_idx = input.GetCurrentProfile();
486 m_OriginalPresetIndex = current_idx;
487 m_PresetSelector = new OptionSelectorMultistate(layoutRoot.FindAnyWidget("profile_setting_option"), current_idx, null, false, opt1);
488 m_PresetSelector.m_AttemptOptionChange.Insert(OnAttemptSelectPreset);
489 m_PresetSelector.m_OptionChanged.Insert(OnSelectKBPreset);
490 }
proto native int GetProfilesCount()
gets profile by name
proto int GetProfileName(int profile_index, out string name)
gets profile by index
proto native int GetCurrentProfile()
gets currently selected profile
ref OptionSelectorMultistate m_PresetSelector
Определения KeybindingsMenu.c:5
void OnSelectKBPreset(int index)
Определения KeybindingsMenu.c:505
int m_OriginalPresetIndex
Определения KeybindingsMenu.c:18
void OnAttemptSelectPreset(int index)
Определения KeybindingsMenu.c:492
WorkspaceWidget Widget
Defined in code.

Перекрестные ссылки Input::GetCurrentProfile(), Input::GetProfileName(), Input::GetProfilesCount(), m_OriginalPresetIndex, m_PresetSelector, OnAttemptSelectPreset() и OnSelectKBPreset().

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