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

◆ InitPresets()

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

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

485 {
486 Widget kb_root = parent.FindAnyWidget("keyboard_dropown");
487 if (kb_root)
488 {
489 kb_root.Show(false);
490 }
491
492 array<string> opt1 = new array<string>;
493 string profile_text;
494
495 for (int i = 0; i < input.GetProfilesCount(); i++)
496 {
497 input.GetProfileName(i, profile_text);
498 opt1.Insert(profile_text);
499 }
500
501 int current_idx = input.GetCurrentProfile();
502 m_OriginalPresetIndex = current_idx;
503 m_PresetSelector = new OptionSelectorMultistate(layoutRoot.FindAnyWidget("profile_setting_option"), current_idx, null, false, opt1);
504 m_PresetSelector.m_AttemptOptionChange.Insert(OnAttemptSelectPreset);
505 m_PresetSelector.m_OptionChanged.Insert(OnSelectKBPreset);
506 }
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:521
int m_OriginalPresetIndex
Определения KeybindingsMenu.c:18
void OnAttemptSelectPreset(int index)
Определения KeybindingsMenu.c:508
WorkspaceWidget Widget
Defined in code.

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

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