DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
DigitalCodeLockUI.c
См. документацию.
2{
3 private const int MOVE_LEFT = 0;
4 private const int MOVE_RIGHT = 1;
5 private const int MOVE_UP = 2;
6 private const int MOVE_DOWN = 3;
7
8 private const int RESET_BUTTON_INDEX = 9;
9 private const int CONFIRM_BUTTON_INDEX = 11;
10
11 private const float BT_REPEAT_DELAY = 0.35; // Delay from first press to begin tick repeat state
12 private const float BT_REPEAT_TIME = 0.09; // Tick repeat frequency time
13 private const float BT_THRESHOLD_VALUE = 0.8; // Threshold values for analog inputs
14
15 private const int MIN_LOCK_PIN_LENGTH = 4;
16 private const int MAX_LOCK_PIN_LENGTH = 6;
17
18#ifndef PLATFORM_CONSOLE
19 private const int KEY_DIGIT_1 = 0;
20 private const int KEY_DIGIT_2 = 1;
21 private const int KEY_DIGIT_3 = 2;
22 private const int KEY_DIGIT_4 = 3;
23 private const int KEY_DIGIT_5 = 4;
24 private const int KEY_DIGIT_6 = 5;
25 private const int KEY_DIGIT_7 = 6;
26 private const int KEY_DIGIT_8 = 7;
27 private const int KEY_DIGIT_9 = 8;
28 private const int KEY_DIGIT_CLEAR = 9;
29 private const int KEY_DIGIT_0 = 10;
30 private const int KEY_DIGIT_CONFIRM = 11;
31
33#endif
34
35 private ref array<string> m_InvInputNames = {"UAUILeftInventory","UAUIRightInventory","UAUIUpInventory","UAUIDownInventory"};
39 private float m_SensitivityThreshold = 0.0;
41 private int m_InvInputActive = 0;
42
43 private ref array<string> m_InputExcludes = {"menu_move"};
44
46 private int m_SelectedButtonIndex = 0; // Default to button "5" (index 4)
47 protected bool m_IsActive = false;
48
49 private string m_EnteredPIN;
52 private bool m_HasPIN = false;
53
56
58 {
59 #ifndef PLATFORM_CONSOLE
60 if (!m_KeyCodeMap)
61 {
63 m_KeyCodeMap.Insert(KeyCode.KC_1, KEY_DIGIT_1);
64 m_KeyCodeMap.Insert(KeyCode.KC_NUMPAD1, KEY_DIGIT_1);
65 m_KeyCodeMap.Insert(KeyCode.KC_2, KEY_DIGIT_2);
66 m_KeyCodeMap.Insert(KeyCode.KC_NUMPAD2, KEY_DIGIT_2);
67 m_KeyCodeMap.Insert(KeyCode.KC_3, KEY_DIGIT_3);
68 m_KeyCodeMap.Insert(KeyCode.KC_NUMPAD3, KEY_DIGIT_3);
69 m_KeyCodeMap.Insert(KeyCode.KC_4, KEY_DIGIT_4);
70 m_KeyCodeMap.Insert(KeyCode.KC_NUMPAD4, KEY_DIGIT_4);
71 m_KeyCodeMap.Insert(KeyCode.KC_5, KEY_DIGIT_5);
72 m_KeyCodeMap.Insert(KeyCode.KC_NUMPAD5, KEY_DIGIT_5);
73 m_KeyCodeMap.Insert(KeyCode.KC_6, KEY_DIGIT_6);
74 m_KeyCodeMap.Insert(KeyCode.KC_NUMPAD6, KEY_DIGIT_6);
75 m_KeyCodeMap.Insert(KeyCode.KC_7, KEY_DIGIT_7);
76 m_KeyCodeMap.Insert(KeyCode.KC_NUMPAD7, KEY_DIGIT_7);
77 m_KeyCodeMap.Insert(KeyCode.KC_8, KEY_DIGIT_8);
78 m_KeyCodeMap.Insert(KeyCode.KC_NUMPAD8, KEY_DIGIT_8);
79 m_KeyCodeMap.Insert(KeyCode.KC_9, KEY_DIGIT_9);
80 m_KeyCodeMap.Insert(KeyCode.KC_NUMPAD9, KEY_DIGIT_9);
81 m_KeyCodeMap.Insert(KeyCode.KC_BACK, KEY_DIGIT_CLEAR);
82 m_KeyCodeMap.Insert(KeyCode.KC_0, KEY_DIGIT_0);
83 m_KeyCodeMap.Insert(KeyCode.KC_NUMPAD0, KEY_DIGIT_0);
84 m_KeyCodeMap.Insert(KeyCode.KC_NUMPADENTER, KEY_DIGIT_CONFIRM);
85 m_KeyCodeMap.Insert(KeyCode.KC_RETURN, KEY_DIGIT_CONFIRM);
86 }
87 #endif
88 }
89
91 {
92 m_EnteredPIN = "";
93 m_TargetLock = null;
94 }
95
97 {
98 int namesCount = m_InvInputNames.Count();
101
102 foreach (string inputName : m_InvInputNames)
103 {
104 m_InvInputWrappers.Insert(GetUApi().GetInputByName(inputName).GetPersistentWrapper());
105 m_InvInputTimes.Insert(0);
106 }
107
109 }
110
112 {
113 if (m_TargetLock || !lock)
114 return;
115
116 m_TargetLock = lock.GetParent();
117 m_TargetPosition = lock.GetPosition();
118 m_HasPIN = lock.HasPIN();
119
120 #ifdef CODELOCKCOMPONENT_LOG
121 ErrorEx("Set lock=" + m_TargetLock, ErrorExSeverity.INFO);
122 ErrorEx("Lock position=" + m_TargetPosition, ErrorExSeverity.INFO);
123 ErrorEx("Has code=" + m_HasPIN, ErrorExSeverity.INFO);
124 #endif
125 }
126
127 protected string GetLayout()
128 {
129 return "gui/layouts/day_z_digital_lock.layout";
130 }
131
132 override Widget Init()
133 {
134 layoutRoot = GetGame().GetWorkspace().CreateWidgets(GetLayout());
135
136 m_ConsoleToolbar = layoutRoot.FindWidget("ConsoleToolbar");
137 m_ConsoleToolbarRichText = RichTextWidget.Cast(layoutRoot.FindAnyWidget("ContextToolbarText"));
138
141
142 #ifdef PLATFORM_CONSOLE
143 GetGame().GetMission().GetOnInputDeviceChanged().Insert(OnInputDeviceChanged);
144 #else
145 m_ConsoleToolbar.Show(false);
146 #endif
147
148 return layoutRoot;
149 }
150
152 {
153 // Store references to all number buttons in order (1-9, C, 0, Enter)
155
156 // Add all buttons in the layout to the array
157 m_NumButtons.Insert(ButtonWidget.Cast(layoutRoot.FindAnyWidget("KeyNumber1_Button")));
158 m_NumButtons.Insert(ButtonWidget.Cast(layoutRoot.FindAnyWidget("KeyNumber2_Button")));
159 m_NumButtons.Insert(ButtonWidget.Cast(layoutRoot.FindAnyWidget("KeyNumber3_Button")));
160 m_NumButtons.Insert(ButtonWidget.Cast(layoutRoot.FindAnyWidget("KeyNumber4_Button")));
161 m_NumButtons.Insert(ButtonWidget.Cast(layoutRoot.FindAnyWidget("KeyNumber5_Button")));
162 m_NumButtons.Insert(ButtonWidget.Cast(layoutRoot.FindAnyWidget("KeyNumber6_Button")));
163 m_NumButtons.Insert(ButtonWidget.Cast(layoutRoot.FindAnyWidget("KeyNumber7_Button")));
164 m_NumButtons.Insert(ButtonWidget.Cast(layoutRoot.FindAnyWidget("KeyNumber8_Button")));
165 m_NumButtons.Insert(ButtonWidget.Cast(layoutRoot.FindAnyWidget("KeyNumber9_Button")));
166 m_NumButtons.Insert(ButtonWidget.Cast(layoutRoot.FindAnyWidget("KeyClear_Button")));
167 m_NumButtons.Insert(ButtonWidget.Cast(layoutRoot.FindAnyWidget("KeyNumber0_Button")));
168 m_NumButtons.Insert(ButtonWidget.Cast(layoutRoot.FindAnyWidget("KeyLock_Button")));
169 }
170
171 protected void ClearInput()
172 {
173 m_EnteredPIN = "";
174 for (int i = 0; i < MAX_LOCK_PIN_LENGTH; ++i)
175 {
176 TextWidget digitTextW = TextWidget.Cast(layoutRoot.FindAnyWidget("PasswordDigitNumber_Text" + i));
177 if (digitTextW)
178 digitTextW.SetText("");
179 }
180 }
181
182 protected void Select()
183 {
184 int i;
185 TextWidget digitTextW;
186
188 {
189 Param1<int> uiAction = new Param1<int>(0);
191 {
192 uiAction.param1 = CodeLockUIAction.CONFIRM_INPUT;
193 g_Game.RPCSingleParam(m_TargetLock, ERPCs.RPC_CODE_LOCK_UI_ACTION, uiAction, true);
194 ConfirmCode();
195 }
196 else if (m_SelectedButtonIndex == RESET_BUTTON_INDEX) // Reset
197 {
198 uiAction.param1 = CodeLockUIAction.CLEAR_INPUT;
199 g_Game.RPCSingleParam(m_TargetLock, ERPCs.RPC_CODE_LOCK_UI_ACTION, uiAction, true);
200 ClearInput();
201 }
202 else // Select digit
203 {
204 uiAction.param1 = CodeLockUIAction.DIGIT_INPUT;
205 g_Game.RPCSingleParam(m_TargetLock, ERPCs.RPC_CODE_LOCK_UI_ACTION, uiAction, true);
206
207 string codeText;
208 if (m_EnteredPIN == "")
209 {
210 codeText = "";
211 }
212 else
213 {
214 codeText = m_EnteredPIN;
215 }
216
217 int codeLength = codeText.Length();
218 if (codeLength < MAX_LOCK_PIN_LENGTH)
219 {
220 int digit;
221 if (m_SelectedButtonIndex <= 9)
222 digit = m_SelectedButtonIndex + 1;
223 else if (m_SelectedButtonIndex == 10)
224 digit = 0;
225
226 codeText = codeText + digit.ToString();
227 m_EnteredPIN = codeText;
228
229 #ifdef CODELOCKCOMPONENT_LOG
230 ErrorEx("Code=" + m_EnteredPIN, ErrorExSeverity.INFO);
231 #endif
232
233 string digitS = m_EnteredPIN[0];
234
235 for (i = 0; i < m_EnteredPIN.Length(); ++i)
236 {
237 digitTextW = TextWidget.Cast(layoutRoot.FindAnyWidget("PasswordDigitNumber_Text" + i));
238 if (digitTextW)
239 digitTextW.SetText(m_EnteredPIN[i]);
240 }
241 }
242 }
243 }
244 }
245
246 protected void ConfirmCode()
247 {
248 if (m_EnteredPIN == "" || !m_TargetLock)
249 return;
250
251 int pinLength = m_EnteredPIN.Length();
252 int minPINLength = MIN_LOCK_PIN_LENGTH;
253
254 DigitalCodeLock codeLock;
255 if (Class.CastTo(codeLock, m_TargetLock))
256 minPINLength = codeLock.GetMinLockPINLength();
257
258 if (pinLength < minPINLength || pinLength > MAX_LOCK_PIN_LENGTH)
259 return;
260
261 #ifdef CODELOCKCOMPONENT_LOG
262 ErrorEx("PIN set to=" + m_EnteredPIN, ErrorExSeverity.INFO);
263 #endif
264
265 for (int i = 0; i < MAX_LOCK_PIN_LENGTH - 1; ++i)
266 {
267 TextWidget digitTextW = TextWidget.Cast(layoutRoot.FindAnyWidget("PasswordDigitNumber_Text" + i));
268 if (digitTextW)
269 digitTextW.SetText("");
270 }
271
272 Param1<string> pin = new Param1<string>(m_EnteredPIN);
273 g_Game.RPCSingleParam(m_TargetLock, ERPCs.RPC_CODE_LOCK_REQUEST, pin, true);
274 m_EnteredPIN = "";
275 }
276
277 override void CodeResponse(bool response)
278 {
279 if (m_HasPIN)
280 {
281 if (response)
282 {
283 // Lock has code and dialed code was correct. CLOSE UI
284 Close();
285 }
286 else
287 {
288 // Lock has code and dialed code was incorrect. CLOSE UI
289 Close();
290 }
291 }
292 else
293 {
294 if (response)
295 {
296 // Lock has no code and dialed code was accepted. CLOSE UI
297 Close();
298 }
299 }
300 }
301
302 protected void ControllerMovementButtonTickHandler(float timeslice)
303 {
304 float tickvalue = 0;
305
306 if (m_SensitivityThreshold > 0.0)
307 {
308 if (m_SensitivityThreshold < BT_REPEAT_TIME) //sensitivity solution...
309 {
310 m_SensitivityThreshold += timeslice;
311 return;
312 }
313 else
314 {
316 }
317 }
318
319 for (int i = 0; i < m_InvInputWrappersCount; i++)
320 {
321 m_InvUAInput = m_InvInputWrappers[i].InputP();
322
323 if (m_InvUAInput.LocalValue() > BT_THRESHOLD_VALUE)
324 {
325 tickvalue = m_InvInputTimes[i];
326 tickvalue += timeslice;
327 }
328 else
329 {
330 tickvalue = 0.0;
331 }
332
333 if (tickvalue < BT_REPEAT_DELAY && m_InvUAInput.LocalPress())
334 {
335 m_InvInputActive |= (1 << i);
336 m_SensitivityThreshold += timeslice;
337 }
338 else if (tickvalue > (BT_REPEAT_DELAY + BT_REPEAT_TIME))
339 {
340 while (tickvalue > (BT_REPEAT_DELAY + BT_REPEAT_TIME))
341 {
342 tickvalue -= BT_REPEAT_TIME;
343 }
344
345 m_InvInputActive |= (1 << i);
346 m_SensitivityThreshold += timeslice;
347 }
348 else
349 {
350 m_InvInputActive &= ~(1 << i);
351 }
352
353 m_InvInputTimes[i] = tickvalue;
354 }
355 }
356
357 override void Update(float timeslice)
358 {
359 super.Update(timeslice);
360
361 // Close menu if player reaches certain distance to lock
362 if (m_TargetLock)
363 {
364 Man player = g_Game.GetPlayer();
365 vector playerPos = player.GetPosition();
366
367 if (vector.DistanceSq(playerPos, m_TargetPosition) > 5.0 * 5.0)
368 {
369 Close();
370 return;
371 }
372 }
373
374 Input input = GetGame().GetInput();
375 if (input.LocalPress("UAUIBack", false))
376 {
377 Close();
378 return;
379 }
380
381 #ifdef PLATFORM_CONSOLE
382 CheckControllerInputs(input, timeslice);
383 #endif
384 }
385
386 protected void CheckControllerInputs(Input input, float timeslice)
387 {
388 if (input.LocalPress("UAUICtrlX", false))
389 {
390 ConfirmCode();
391 return;
392 }
393 else if (input.LocalPress("UAUICtrlY", false))
394 {
395 ClearInput();
396 return;
397 }
398
399 // lock ui movement
401
402 if (m_InvInputActive & (1 << MOVE_RIGHT))
403 {
405 }
406
407 if (m_InvInputActive & (1 << MOVE_LEFT))
408 {
409 NavigateLeft();
410 }
411
412 if (m_InvInputActive & (1 << MOVE_UP))
413 {
414 NavigateUp();
415 }
416
417 if (m_InvInputActive & (1 << MOVE_DOWN))
418 {
419 NavigateDown();
420 }
421
423 }
424
425 protected void NavigateRight()
426 {
427 int row = m_SelectedButtonIndex / 3;
428 int col = m_SelectedButtonIndex % 3;
429
430 // Move right (if not at right edge)
431 if (col < 2)
432 {
433 m_SelectedButtonIndex = row * 3 + (col + 1);
434 UpdateFocus();
435 }
436 }
437
438 protected void NavigateLeft()
439 {
440 int row = m_SelectedButtonIndex / 3;
441 int col = m_SelectedButtonIndex % 3;
442
443 // Move left (if not at left edge)
444 if (col > 0)
445 {
446 m_SelectedButtonIndex = row * 3 + (col - 1);
447 UpdateFocus();
448 }
449 }
450
451 protected void NavigateUp()
452 {
453 int row = m_SelectedButtonIndex / 3;
454 int col = m_SelectedButtonIndex % 3;
455
456 // Move up (if not at top edge)
457 if (row > 0)
458 {
459 m_SelectedButtonIndex = (row - 1) * 3 + col;
460 UpdateFocus();
461 }
462 }
463
464 protected void NavigateDown()
465 {
466 int row = m_SelectedButtonIndex / 3;
467 int col = m_SelectedButtonIndex % 3;
468
469 // Move down (if not at bottom edge)
470 if (row < 3)
471 {
472 m_SelectedButtonIndex = (row + 1) * 3 + col;
473 UpdateFocus();
474 }
475 }
476
477 protected void UpdateFocus()
478 {
480 {
481 // Position highlight over selected button
482 ButtonWidget selectedBtn = m_NumButtons[m_SelectedButtonIndex];
483 if (selectedBtn)
484 {
485 SetFocus(selectedBtn);
486 }
487 }
488 }
489
490 void SetActive(bool active)
491 {
492 m_IsActive = active;
493
494 if (active)
495 {
497 }
498 }
499
500 // Console toolbar
501 protected void UpdateConsoleToolbar()
502 {
503 string select = string.Format(" %1", InputUtils.GetRichtextButtonIconFromInputAction("UAUISelect", "Select", EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
504 string confirm = string.Format(" %1", InputUtils.GetRichtextButtonIconFromInputAction("UAUICtrlX", "Confirm PIN", EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
505 string clear = string.Format(" %1", InputUtils.GetRichtextButtonIconFromInputAction("UAUICtrlY", "Clear PIN", EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
506 string close = string.Format(" %1", InputUtils.GetRichtextButtonIconFromInputAction("UAUIBack", "Exit", EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
507
508 string navigateIcon;
509 #ifdef PLATFORM_PS4
510 navigateIcon = string.Format("<image set=\"%1\" name=\"%2\" scale=\"%3\" />", "playstation_buttons2", "DPAD_all_directions");
511 #else
512 navigateIcon = string.Format("<image set=\"%1\" name=\"%2\" scale=\"%3\" />", "xbox_buttons2", "DPAD_all_directions");
513 #endif
514 string navigate = string.Format(" %1 %2", navigateIcon, "Navigate");
515 string text = string.Format("%1 %2 %3 %4 %5", navigate, select, confirm, clear, close);
516 m_ConsoleToolbarRichText.SetText(text);
517 }
518
519 protected void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
520 {
521 int i;
522 ButtonWidget button;
523 MissionGameplay mission = MissionGameplay.Cast(g_Game.GetMission());
524
525 switch (pInputDeviceType)
526 {
527 case EInputDeviceType.CONTROLLER:
528 {
529 m_ConsoleToolbar.Show(true);
530
531 if (mission)
532 mission.MoveHudForInventory(true);
533
534 g_Game.GetUIManager().ShowUICursor(false);
535
536 button = ButtonWidget.Cast(GetFocus());
537 if (button)
538 button.SetState(false);
539
541
543 break;
544 }
545 default:
546 {
547 if (g_Game.GetInput().IsEnabledMouseAndKeyboardEvenOnServer())
548 {
549 m_ConsoleToolbar.Show(false);
550
551 if (mission)
552 mission.MoveHudForInventory(false);
553
554 g_Game.GetUIManager().ShowUICursor(true);
555
556 button = ButtonWidget.Cast(GetFocus());
557 if (button)
558 button.SetState(false);
559
561 }
562 break;
563 }
564 }
565 }
566
567 override void OnShow()
568 {
569 super.OnShow();
570
571 MissionGameplay mission = MissionGameplay.Cast(g_Game.GetMission());
572 if (!mission)
573 return;
574
575 mission.AddActiveInputExcludes(m_InputExcludes);
576
577 #ifdef PLATFORM_CONSOLE
578 Widget w = m_NumButtons[0];
579 if (w)
580 SetFocus(w);
581
582 mission.MoveHudForInventory(true);
583
584 OnInputDeviceChanged(g_Game.GetInput().GetCurrentInputDevice());
585 #endif
586 }
587
588 override void OnHide()
589 {
590 super.OnHide();
591
592 MissionGameplay mission = MissionGameplay.Cast(g_Game.GetMission());
593 if (!mission)
594 return;
595
596 mission.RemoveActiveInputExcludes(m_InputExcludes);
597 #ifdef PLATFORM_CONSOLE
598 mission.MoveHudForInventory(false);
599 #endif
600
601 ClearInput();
602 }
603
604 override bool OnClick(Widget w, int x, int y, int button)
605 {
606 super.OnClick(w, x, y, button);
607
608 for (int i = 0; i < m_NumButtons.Count(); i++)
609 {
610 ButtonWidget bw = m_NumButtons[i];
611 if (w == bw)
612 {
614 Select();
615 return true;
616 }
617 }
618
619 return false;
620 }
621
622#ifndef PLATFORM_CONSOLE
623 override void KeyPress(int key)
624 {
625 super.KeyPress(key);
626
627 int buttonIndex = -1;
628 if (m_KeyCodeMap.Find(key, buttonIndex) && buttonIndex > -1)
629 {
630 m_SelectedButtonIndex = buttonIndex;
631 Select();
632 }
633 }
634#endif
635}
void CodeLockComponent(notnull EntityAI parent, int minLockPinLength=MIN_LOCK_PIN_LENGTH)
Определения CodeLockComponent.c:51
DayZGame g_Game
Определения DayZGame.c:4074
Mission mission
Определения DisplayStatus.c:28
ERPCs
Определения ERPCs.c:2
Icon x
Icon y
void Close()
proto native UAInputAPI GetUApi()
Super root of all classes in Enforce script.
Определения EnScript.c:11
int GetMinLockPINLength()
Определения CodeLock.c:398
Определения CodeLock.c:2
void ControllerMovementButtonTickHandler(float timeslice)
Определения DigitalCodeLockUI.c:302
void UpdateConsoleToolbar()
Определения DigitalCodeLockUI.c:501
vector m_TargetPosition
Определения DigitalCodeLockUI.c:51
const int KEY_DIGIT_7
Определения DigitalCodeLockUI.c:25
const int MOVE_DOWN
Определения DigitalCodeLockUI.c:6
const int KEY_DIGIT_4
Определения DigitalCodeLockUI.c:22
ref array< UAIDWrapper > m_InvInputWrappers
Определения DigitalCodeLockUI.c:36
const int MOVE_LEFT
Определения DigitalCodeLockUI.c:3
override void CodeResponse(bool response)
Определения DigitalCodeLockUI.c:277
void DigitalCodeLockUI()
Определения DigitalCodeLockUI.c:57
string m_EnteredPIN
Определения DigitalCodeLockUI.c:49
const float BT_THRESHOLD_VALUE
Определения DigitalCodeLockUI.c:13
override Widget Init()
Определения DigitalCodeLockUI.c:132
const int KEY_DIGIT_5
Определения DigitalCodeLockUI.c:23
const int KEY_DIGIT_0
Определения DigitalCodeLockUI.c:29
Widget m_ConsoleToolbar
Определения DigitalCodeLockUI.c:54
const int MAX_LOCK_PIN_LENGTH
Определения DigitalCodeLockUI.c:16
override bool OnClick(Widget w, int x, int y, int button)
Определения DigitalCodeLockUI.c:604
void NavigateLeft()
Определения DigitalCodeLockUI.c:438
bool m_IsActive
Определения DigitalCodeLockUI.c:47
ref map< KeyCode, int > m_KeyCodeMap
Определения DigitalCodeLockUI.c:32
string GetLayout()
Определения DigitalCodeLockUI.c:127
void NavigateRight()
Определения DigitalCodeLockUI.c:425
override void KeyPress(int key)
Определения DigitalCodeLockUI.c:623
override void Update(float timeslice)
Определения DigitalCodeLockUI.c:357
void CheckControllerInputs(Input input, float timeslice)
Определения DigitalCodeLockUI.c:386
ref array< string > m_InputExcludes
Определения DigitalCodeLockUI.c:43
override void SetTargetLock(CodeLockComponent lock)
Определения DigitalCodeLockUI.c:111
const int KEY_DIGIT_2
Определения DigitalCodeLockUI.c:20
const int MOVE_RIGHT
Определения DigitalCodeLockUI.c:4
RichTextWidget m_ConsoleToolbarRichText
Определения DigitalCodeLockUI.c:55
void NavigateDown()
Определения DigitalCodeLockUI.c:464
void UpdateFocus()
Определения DigitalCodeLockUI.c:477
int m_SelectedButtonIndex
Определения DigitalCodeLockUI.c:46
const int KEY_DIGIT_8
Определения DigitalCodeLockUI.c:26
void NavigateUp()
Определения DigitalCodeLockUI.c:451
const float BT_REPEAT_DELAY
Определения DigitalCodeLockUI.c:11
const int KEY_DIGIT_3
Определения DigitalCodeLockUI.c:21
void InitializeButtons()
Определения DigitalCodeLockUI.c:151
override void OnShow()
Определения DigitalCodeLockUI.c:567
bool m_HasPIN
Определения DigitalCodeLockUI.c:52
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
Определения DigitalCodeLockUI.c:519
const int RESET_BUTTON_INDEX
Определения DigitalCodeLockUI.c:8
ref array< string > m_InvInputNames
Определения DigitalCodeLockUI.c:35
ref array< float > m_InvInputTimes
Определения DigitalCodeLockUI.c:37
const int KEY_DIGIT_CONFIRM
Определения DigitalCodeLockUI.c:30
const int KEY_DIGIT_CLEAR
Определения DigitalCodeLockUI.c:28
const int CONFIRM_BUTTON_INDEX
Определения DigitalCodeLockUI.c:9
void ~DigitalCodeLockUI()
Определения DigitalCodeLockUI.c:90
void SetActive(bool active)
Определения DigitalCodeLockUI.c:490
void InitInputWrapperData()
Определения DigitalCodeLockUI.c:96
const int KEY_DIGIT_6
Определения DigitalCodeLockUI.c:24
void ConfirmCode()
Определения DigitalCodeLockUI.c:246
const float BT_REPEAT_TIME
Определения DigitalCodeLockUI.c:12
void ClearInput()
Определения DigitalCodeLockUI.c:171
const int MOVE_UP
Определения DigitalCodeLockUI.c:5
ref array< ButtonWidget > m_NumButtons
Определения DigitalCodeLockUI.c:45
const int KEY_DIGIT_9
Определения DigitalCodeLockUI.c:27
UAInput m_InvUAInput
Определения DigitalCodeLockUI.c:40
void Select()
Определения DigitalCodeLockUI.c:182
EntityAI m_TargetLock
Определения DigitalCodeLockUI.c:50
int m_InvInputActive
Определения DigitalCodeLockUI.c:41
const int KEY_DIGIT_1
Определения DigitalCodeLockUI.c:19
const int MIN_LOCK_PIN_LENGTH
Определения DigitalCodeLockUI.c:15
int m_InvInputWrappersCount
Определения DigitalCodeLockUI.c:38
float m_SensitivityThreshold
Определения DigitalCodeLockUI.c:39
override void OnHide()
Определения DigitalCodeLockUI.c:588
proto native bool LocalPress(string action, bool check_focus=true)
Определения input.c:11
static string GetRichtextButtonIconFromInputAction(notnull UAInput pInput, string pLocalizedDescription, int pInputDeviceType=EUAINPUT_DEVICE_CONTROLLER, float pScale=ICON_SCALE_NORMAL, bool pVertical=false)
Определения InputUtils.c:167
static const float ICON_SCALE_TOOLBAR
Определения InputUtils.c:15
Определения InputUtils.c:2
Определения gameplay.c:317
Определения EnWidgets.c:220
Определения UAInput.c:34
Определения EnWidgets.c:190
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Определения Transport.c:70
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
Определения EnConvert.c:119
DayZGame GetGame()
Определения gameplay.c:636
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
KeyCode
Определения EnSystem.c:157
proto native int Length()
Returns length of string.
static proto string ToString(void var, bool type=false, bool name=false, bool quotes=true)
Return string representation of variable.
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.
proto native Widget GetFocus()
proto native void SetFocus(Widget w)
EInputDeviceType
Определения input.c:3