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

◆ InitPresets()

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

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

42 {
43 Widget kb_root = parent.FindAnyWidget( "keyboard_dropown" );
44
45 string profile_text;
46 input.GetProfileName( input.GetCurrentProfile(), profile_text );
47
48 m_KBDropdown = new DropdownPrefab( kb_root, profile_text );
49
50 m_KBDropdown.m_OnSelectItem.Insert( OnSelectKBPreset );
51
52 for( int i = 0; i < input.GetProfilesCount(); i++ )
53 {
54 input.GetProfileName( i, profile_text );
55 m_KBDropdown.AddElement( profile_text );
56 }
57
58 kb_root.Update();
59 }
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
void DropdownPrefab(Widget root, string text="")
Определения DropdownPrefab.c:18
ref DropdownPrefab m_KBDropdown
Определения KeybindingsGroup.c:11
void OnSelectKBPreset(int index)
Определения KeybindingsGroup.c:61
WorkspaceWidget Widget
Defined in code.

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

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