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

◆ Reload() [2/7]

void ScriptedWidgetEventHandler::Reload ( )
inlineprotected

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

121 {
122 UAInput input = GetUApi().GetInputByID( m_ElementIndex );
123 m_IsEdited = false;
124 m_IsAlternateEdited = false;
125 m_CustomBind = null;
127
128 if( input.IsLimited() )
129 {
130 if( input.IsPressLimit() )
131 {
132 m_ElementModifier.SetText( "#keybind_press" );
133 }
134 if( input.IsReleaseLimit() )
135 {
136 m_ElementModifier.SetText( "#keybind_release" );
137 }
138 if( input.IsHoldLimit() )
139 {
140 m_ElementModifier.SetText( "#keybind_hold" );
141 }
142 if( input.IsHoldBeginLimit() )
143 {
144 m_ElementModifier.SetText( "#keybind_holdbegin" );
145 }
146 if( input.IsClickLimit() )
147 {
148 m_ElementModifier.SetText( "#keybind_click" );
149 }
150 if( input.IsDoubleClickLimit() )
151 {
152 m_ElementModifier.SetText( "#keybind_doubletap" );
153 }
154 }
155 else
156 {
157 m_ElementModifier.SetText( "" );
158 }
159
160 string option_text;
161 string name;
162
163 GetGame().GetInput().GetActionDesc( m_ElementIndex, option_text );
164 m_ElementName.SetText( option_text );
165
166 // column #1 :: keyboard + mouse
167 SetElementTitle(m_PrimaryBindButton, input, EUAINPUT_DEVICE_KEYBOARDMOUSE);
168
169 // column #2 :: controller
170 SetElementTitle(m_AlternativeBindButton, input, EUAINPUT_DEVICE_CONTROLLER);
171 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
proto native UAInputAPI GetUApi()
proto native Input GetInput()
proto int GetActionDesc(int action_index, out string desc)
TextWidget m_ElementName
Определения KeybindingElement.c:7
ref array< int > m_CustomBind
Определения KeybindingElement.c:18
ButtonWidget m_AlternativeBindButton
Определения KeybindingElement.c:10
ref array< int > m_CustomAlternateBind
Определения KeybindingElement.c:19
TextWidget m_ElementModifier
Определения KeybindingElement.c:8
ButtonWidget m_PrimaryBindButton
Определения KeybindingElement.c:9
bool SetElementTitle(UAInput pInput, int iDeviceFlags, out string output)
assemble all active bindings at widget element
Определения ControlMappingKeybinds.c:74
bool m_IsAlternateEdited
Определения KeybindingElement.c:16
proto native bool IsHoldLimit()
proto native bool IsClickLimit()
proto native UAInput GetInputByID(int iID)
returns list of all bindable (i.e. visible) inputs from the active group ('core' by default)
proto native bool IsReleaseLimit()
proto native bool IsHoldBeginLimit()
proto native bool IsPressLimit()
proto native bool IsLimited()
proto native bool IsDoubleClickLimit()
proto native CGame GetGame()

Перекрестные ссылки Input::GetActionDesc(), GetGame(), CGame::GetInput(), UAInputAPI::GetInputByID(), GetUApi(), UAInput::IsClickLimit(), UAInput::IsDoubleClickLimit(), UAInput::IsHoldBeginLimit(), UAInput::IsHoldLimit(), UAInput::IsLimited(), UAInput::IsPressLimit(), UAInput::IsReleaseLimit(), m_AlternativeBindButton, m_CustomAlternateBind, m_CustomBind, m_ElementIndex, m_ElementModifier, m_ElementName, m_IsAlternateEdited, m_IsEdited, m_PrimaryBindButton, name и SetElementTitle().