DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ItemActionsWidget.c
См. документацию.
1class ItemActionsWidget extends ScriptedWidgetEventHandler
2{
3 protected PlayerBase m_Player;
10 protected IngameHud m_Hud;
11
13
14 protected int m_InteractActionsNum;
16 protected int m_ItemActionsNum;
18 protected bool m_HealthEnabled;
19 protected bool m_QuantityEnabled;
20
21 protected ref WidgetFadeTimer m_FadeTimer;
22 protected bool m_Faded;
23 protected bool m_Hidden;
24 protected bool m_ItemFrozen;
25
26 protected Widget m_Root;
27 protected Widget m_ItemLeft;
28
30 protected float m_MaxWidthChild;
31 protected float m_RootWidth;
32 protected float m_RootHeight;
33
35 {
36 m_Interact = null;
38 m_Single = null;
39 m_Continuous = null;
40 m_AM = null;
41
42 m_FadeTimer = new WidgetFadeTimer;
43 m_Faded = true;
44
45 m_HealthEnabled = true;
46 m_QuantityEnabled = true;
47
48 m_Hud = GetHud();
49 m_Hidden = true;
50 m_ItemFrozen = false;
51
53
54 g_Game.GetUpdateQueue(CALL_CATEGORY_GUI).Insert(Update);
55 g_Game.GetMission().GetOnInputPresetChanged().Insert(OnInputPresetChanged);
56 g_Game.GetMission().GetOnInputDeviceChanged().Insert(OnInputDeviceChanged);
57 }
58
60 {
61 g_Game.GetUpdateQueue(CALL_CATEGORY_GUI).Remove(Update);
62 }
63
65 void SetInteractXboxIcon(string imageset_name, string image_name) {};
66 void SetContinuousInteractXboxIcon(string imageset_name, string image_name) {};
67 void SetSingleXboxIcon(string imageset_name, string image_name) {};
68 void SetContinuousXboxIcon(string imageset_name, string image_name) {};
69 protected void SetXboxIcon(string name, string imageset_name, string image_name) {};
71
72 protected void SetControllerIcon(string pWidgetName, string pInputName)
73 {
74 RichTextWidget w = RichTextWidget.Cast(m_Root.FindAnyWidget(pWidgetName + "_btn_icon_xbox"));
75 w.SetText(InputUtils.GetRichtextButtonIconFromInputAction(pInputName, "", EUAINPUT_DEVICE_CONTROLLER));
76 }
77
78 protected void ShowXboxHidePCIcons(string widget, bool show_xbox_icon)
79 {
80 m_Root.FindAnyWidget(widget + "_btn_icon_xbox").Show(show_xbox_icon);
81 m_Root.FindAnyWidget(widget + "_btn_icon").Show(!show_xbox_icon);
82 }
83
84 protected void OnWidgetScriptInit(Widget w)
85 {
86 m_Root = w;
87 m_Root.SetHandler(this);
88 m_Root.Show(false);
89
90 m_ItemLeft = w.FindAnyWidget("ia_item_left");
91
95 }
96
97 protected void OnInputPresetChanged()
98 {
99 #ifdef PLATFORM_CONSOLE
101 #endif
102 }
103
104 protected void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
105 {
107 }
108
111 {
112 SetControllerIcon("ia_interact", "UAAction");
113 SetControllerIcon("ia_continuous_interact", "UAAction");
114 SetControllerIcon("ia_single", "UADefaultAction");
115 SetControllerIcon("ia_continuous", "UADefaultAction");
116 }
117
120 {
121 bool showConsoleIcons = false;
122 #ifdef PLATFORM_CONSOLE
123 showConsoleIcons = g_Game.GetInput().GetCurrentInputDevice() == EInputDeviceType.CONTROLLER || !g_Game.GetInput().IsEnabledMouseAndKeyboardEvenOnServer();
124 #endif
125
126 ShowXboxHidePCIcons("ia_interact", showConsoleIcons);
127 ShowXboxHidePCIcons("ia_continuous_interact", showConsoleIcons);
128 ShowXboxHidePCIcons("ia_single", showConsoleIcons);
129 ShowXboxHidePCIcons("ia_continuous", showConsoleIcons);
130 }
131
132 protected void BuildCursor()
133 {
134 m_ItemFrozen = false;
135 int health = -1;
136 int quantityType = 0;
137 int quantityMin = -1;
138 int quantityMax = -1;
139 float quantityCurrent = -1.0;
140
141 // item health
142 health = GetItemHealth();
144 SetItemHealth(health, "ia_item", "ia_item_health_mark", m_HealthEnabled);
145
146 // quantity
148 if (m_EntityInHands && m_EntityInHands.IsWeapon())
149 {
150 SetWeaponQuantity(0, 0, "ia_item", "ia_item_quantity_pb", "ia_item_quantity_text", m_QuantityEnabled);
151 SetWeaponModeAndZeroing("ia_item_subdesc", "ia_item_subdesc_up", "ia_item_subdesc_down", true);
152 }
154 else if (m_EntityInHands && m_EntityInHands.IsTransmitter() && !m_EntityInHands.IsKindOf("Megaphone"))
155 {
156 string frequency = GetRadioFrequency();
157 SetRadioFrequency(frequency, "ia_item_subdesc", "ia_item_subdesc_up", "ia_item_subdesc_down", frequency.Length() > 0);
158 GetItemQuantity(quantityType, quantityCurrent, quantityMin, quantityMax);
159 SetItemQuantity(quantityType, quantityCurrent, quantityMin, quantityMax, "ia_item", "ia_item_quantity_pb", "ia_item_quantity_text", true);
160 }
161 else
162 {
163 GetItemQuantity(quantityType, quantityCurrent, quantityMin, quantityMax);
164 SetItemQuantity(quantityType, quantityCurrent, quantityMin, quantityMax, "ia_item", "ia_item_quantity_pb", "ia_item_quantity_text", m_QuantityEnabled);
165 SetWeaponModeAndZeroing("ia_item_subdesc", "", "", false);
166 }
167
168 SetItemDesc(m_EntityInHands, GetItemDesc(m_EntityInHands), "ia_item", "ia_item_desc");
169 SetInteractActionIcon("ia_interact", "ia_interact_icon_frame", "ia_interact_btn_inner_icon", "ia_interact_btn_text");
170 SetActionWidget(m_Interact, GetActionDesc(m_Interact), "ia_interact", "ia_interact_action_name");
171
172 SetInteractActionIcon("ia_continuous_interact", "ia_continuous_interact_icon_frame", "ia_continuous_interact_btn_inner_icon", "ia_continuous_interact_btn_text");
173 SetActionWidget(m_ContinuousInteract, GetActionDesc(m_ContinuousInteract), "ia_continuous_interact", "ia_continuous_interact_action_name");
174
175 SetActionWidget(m_Single, GetActionDesc(m_Single), "ia_single", "ia_single_action_name");
176 SetActionWidget(m_Continuous, GetActionDesc(m_Continuous), "ia_continuous", "ia_continuous_action_name");
177 SetMultipleInteractAction("ia_interact_mlt_wrapper");
178 SetMultipleContinuousInteractAction("ia_continuous_interact_mlt_wrapper");
179 SetMultipleItemAction("ia_single_mlt_wrapper");
180 SetMultipleContinuousItemAction("ia_continuous_mlt_wrapper");
181 }
182
183 protected void Update()
184 {
186 if (m_Hud.GetHudVisibility().IsContextFlagActive(IngameHudVisibility.HUD_HIDE_FLAGS))
187 {
188 m_Root.Show(false);
189 return;
190 }
191
192 if (m_Player && !m_Player.IsAlive()) // handle respawn
193 {
194 m_Player = null;
195 m_AM = null;
196 }
197
198 if (!m_Player)
199 GetPlayer();
200
201 if (!m_AM)
203
204 GetActions();
206
207 if ((m_EntityInHands || !m_Hidden) && g_Game.GetUIManager().GetMenu() == null)
208 {
210 BuildCursor();
212 m_Root.Show(true);
213 }
214 else
215 m_Root.Show(false);
216
217 m_MaxWidthChild = 200;
218 }
219
220 // getters
221 protected void GetPlayer()
222 {
223 Class.CastTo(m_Player, g_Game.GetPlayer());
224 }
225
226 protected void GetActionManager()
227 {
228 if (m_Player && m_Player.IsPlayerSelected())
229 ActionManagerClient.CastTo(m_AM, m_Player.GetActionManager());
230 else
231 m_AM = null;
232 }
233
234 protected void GetActions()
235 {
236 m_Interact = null;
238 m_Single = null;
239 m_Continuous = null;
240
241 if (!m_AM)
242 return;
243
244 if (m_Player.IsSprinting())
245 return;
246
247 m_Interact = m_AM.GetPossibleAction(InteractActionInput);
249 m_Single = m_AM.GetPossibleAction(DefaultActionInput);
251
253 m_Hidden = false;
254
255 m_InteractActionsNum = m_AM.GetPossibleActionCount(InteractActionInput);
257 m_ItemActionsNum = m_AM.GetPossibleActionCount(DefaultActionInput);
259 }
260
261 protected void GetEntityInHands()
262 {
263 if (!m_Player) return;
264
265 EntityAI eai = m_Player.GetEntityInHands();
266
267 if (eai && !eai.IsInherited(DummyItem))
268 {
269 m_EntityInHands = eai;
270 }
271 else
272 {
273 m_EntityInHands = null;
274 }
275 }
276
277 protected string GetActionDesc(ActionBase action)
278 {
279 if (action && action.GetText())
280 return action.GetText();
281
282 return string.Empty;
283 }
284
285 protected string GetItemDesc(EntityAI entity)
286 {
287 if (m_EntityInHands)
288 return m_EntityInHands.GetDisplayName();
289
290 return string.Empty;
291 }
292
293 protected bool GetItemFrozen()
294 {
295 return m_EntityInHands && m_EntityInHands.GetIsFrozen();
296 }
297
298 protected int GetItemHealth()
299 {
300 if (m_EntityInHands)
301 return m_EntityInHands.GetHealthLevel();
302
303 return -1;
304 }
305
306 protected void GetItemQuantity(out int q_type, out float q_cur, out int q_min, out int q_max)
307 {
308 if (m_EntityInHands)
309 {
312 if (q_type > 0)
313 {
314 if (q_type == QUANTITY_PROGRESS)
315 {
316 QuantityConversions.GetItemQuantity(item, q_cur, q_min, q_max);
317
318 q_cur = (q_cur / q_max);
319 // to percents
320 q_min = 0;
321 q_cur = q_cur * 100;
322 q_max = 100;
323 }
324 else
325 {
326 QuantityConversions.GetItemQuantity(item, q_cur, q_min, q_max);
327 }
328 }
329 }
330 }
331
332 protected string GetRadioFrequency()
333 {
334 TransmitterBase trans;
335 if (Class.CastTo(trans, m_EntityInHands))
336 {
337 return trans.GetTunedFrequency().ToString();
338 }
339
340 return string.Empty;
341 }
342
343 // setters
344 protected void SetItemDesc(EntityAI entity, string descText, string itemWidget, string descWidget)
345 {
346 Widget widget;
347
348 widget = m_Root.FindAnyWidget(itemWidget);
349
350 if (entity && m_Player && !m_Player.GetItemAccessor().IsItemInHandsHidden())
351 {
352 descText.ToUpper();
353 TextWidget itemName;
354 Class.CastTo(itemName, widget.FindAnyWidget(descWidget));
355 itemName.SetText(descText);
356 widget.Show(true);
357 }
358 else
359 widget.Show(false);
360 }
361
362 protected void SetItemHealth(int health, string itemWidget, string healthWidget, bool enabled)
363 {
364 Widget widget;
365
366 widget = m_Root.FindAnyWidget(itemWidget);
367
368 if (enabled)
369 {
370 ImageWidget healthMark;
371 Class.CastTo(healthMark, widget.FindAnyWidget(healthWidget));
372
373 if (m_ItemFrozen && health != GameConstants.STATE_RUINED)
374 {
375 healthMark.SetColor(Colors.COLOR_FROZEN);
376 healthMark.SetAlpha(0.5);
377 healthMark.GetParent().Show(true);
378 }
379 else
380 {
381 switch (health)
382 {
383 case -1 :
384 healthMark.GetParent().Show(false);
385 break;
387 healthMark.SetColor(Colors.COLOR_PRISTINE);
388 healthMark.SetAlpha(0.5);
389 healthMark.GetParent().Show(true);
390 break;
392 healthMark.SetColor(Colors.COLOR_WORN);
393 healthMark.SetAlpha(0.5);
394 healthMark.GetParent().Show(true);
395 break;
397 healthMark.SetColor(Colors.COLOR_DAMAGED);
398 healthMark.SetAlpha(0.5);
399 healthMark.GetParent().Show(true);
400 break;
402 healthMark.SetColor(Colors.COLOR_BADLY_DAMAGED);
403 healthMark.SetAlpha(0.5);
404 healthMark.GetParent().Show(true);
405 break;
407 healthMark.SetColor(Colors.COLOR_RUINED);
408 healthMark.SetAlpha(0.5);
409 healthMark.GetParent().Show(true);
410 break;
411 default :
412 healthMark.SetColor(0x00FFFFFF);
413 healthMark.SetAlpha(0.5);
414 healthMark.GetParent().Show(true);
415 break;
416 }
417 }
418
419 widget.Show(true);
420 }
421 else
422 widget.Show(false);
423 }
424
425 protected void SetItemQuantity(int type, float current, int min, int max, string itemWidget, string quantityPBWidget, string quantityTextWidget, bool enabled)
426 {
427 Widget widget;
428
429 widget = m_Root.FindAnyWidget(itemWidget);
430
431 if (enabled)
432 {
433 ProgressBarWidget progressBar;
434 TextWidget textWidget;
435 Class.CastTo(progressBar, widget.FindAnyWidget(quantityPBWidget));
436 Class.CastTo(textWidget, widget.FindAnyWidget(quantityTextWidget));
437
438 //check for volume vs. count and display progressbar or "bubble" with exact count/max text
439 switch (type)
440 {
441 case QUANTITY_HIDDEN :
442 progressBar.Show(false);
443 textWidget.Show(false);
444 textWidget.GetParent().Show(false);
445 break;
446 case QUANTITY_COUNT :
447 if (max > 1 || current > 1)
448 {
449 string qty_text = string.Format("%1/%2", Math.Round(current).ToString(), max.ToString());
450 progressBar.Show(false);
451 textWidget.SetText(qty_text);
452 textWidget.Show(true);
453 textWidget.GetParent().Show(true);
454 break;
455 }
456 else
457 {
458 progressBar.Show(false);
459 textWidget.Show(false);
460 textWidget.GetParent().Show(false);
461 break;
462 }
463 case QUANTITY_PROGRESS :
464 textWidget.Show(false);
465 progressBar.SetCurrent(current);
466 progressBar.Show(true);
467 textWidget.GetParent().Show(true);
468 break;
469 }
470 widget.Show(true);
471 }
472 else
473 widget.Show(false);
474 }
475
476 protected void SetWeaponQuantity(int chamber, int mag, string itemWidget, string quantityPBWidget, string quantityTextWidget, bool enabled)
477 {
478 Widget widget;
479
480 widget = m_Root.FindAnyWidget(itemWidget);
481
482 if (enabled)
483 {
484 string wpn_qty = "";
485
486 ProgressBarWidget progressBar;
487 TextWidget textWidget;
488 Class.CastTo(progressBar, widget.FindAnyWidget(quantityPBWidget));
489 Class.CastTo(textWidget, widget.FindAnyWidget(quantityTextWidget));
490
491 Weapon_Base wpn;
492 Magazine maga;
493 int mag_quantity = -1;
494
495 if (Class.CastTo(wpn, m_EntityInHands))
496 {
497 if (Magnum_Base.Cast(wpn))
498 {
499 mag_quantity = 0;
500 for (int j = 0; j < wpn.GetMuzzleCount(); j++)
501 {
502 if (wpn.IsChamberFull(j)&& !wpn.IsChamberFiredOut(j))
503 mag_quantity++;
504 }
505 wpn_qty = mag_quantity.ToString();
506 }
507 else
508 {
509 for (int i = 0; i < wpn.GetMuzzleCount(); i++)
510 {
511 if (i > 0 && (wpn.GetMuzzleCount() < 3 || i%2 == 0))
512 {
513 wpn_qty = wpn_qty + " ";
514 }
515 if (wpn.IsChamberEmpty(i))
516 {
517 wpn_qty = wpn_qty + "0";
518 }
519 else if (wpn.IsChamberFiredOut(i))
520 {
521 wpn_qty = wpn_qty + "F";
522 }
523 else
524 {
525 wpn_qty = wpn_qty + "1";
526 }
527
528 maga = wpn.GetMagazine(i);
529 if (maga)
530 {
531 mag_quantity = maga.GetAmmoCount();
532 }
533 else if (wpn.GetInternalMagazineMaxCartridgeCount(i) > 0)
534 {
535 mag_quantity = wpn.GetInternalMagazineCartridgeCount(i);
536 }
537
538 }
539
540 if (wpn.IsJammed())
541 {
542 if (mag_quantity != -1)
543 wpn_qty = string.Format("X (+%1)", mag_quantity);
544 else
545 wpn_qty = "X";
546 }
547 else
548 {
549 if (mag_quantity != -1)
550 {
551 wpn_qty = wpn_qty + " (" + mag_quantity.ToString() + ")";
552 }
553 }
554 }
555 }
556
557 progressBar.Show(false);
558 textWidget.SetText(wpn_qty);
559 textWidget.Show(true);
560 textWidget.GetParent().Show(true);
561 }
562 else
563 widget.Show(false);
564 }
565
566 protected void SetWeaponModeAndZeroing(string itemWidget, string upWidget, string downWidget, bool enabled)
567 {
568 Widget widget;
569
570 widget = m_Root.FindAnyWidget(itemWidget);
571
572 if (enabled && m_Player)
573 {
574 TextWidget txtModeWidget;
575 TextWidget txtZeroingWidget;
576
577 Class.CastTo(txtModeWidget, widget.FindAnyWidget(upWidget));
578 Class.CastTo(txtZeroingWidget, widget.FindAnyWidget(downWidget));
579
580 Weapon w = Weapon.Cast(m_Player.GetEntityInHands());
581 string zeroing = string.Empty;
582 if (w)
583 zeroing = string.Format("%1 m", w.GetCurrentZeroing(w.GetCurrentMuzzle()));
584
585 txtModeWidget.SetText(m_Player.GetWeaponManager().GetCurrentModeName());
586 txtZeroingWidget.SetText(zeroing);
587 widget.Show(true);
588 }
589 else
590 widget.Show(false);
591 }
592
593 // not used instead of this is used confing parameter for fire mode
594 protected string WeaponModeTextTemp()
595 {
596 return "unused";
597 }
598
599 protected void SetRadioFrequency(string freq, string itemWidget, string upWidget, string downWidget, bool enabled)
600 {
601 Widget widget;
602
603 widget = m_Root.FindAnyWidget(itemWidget);
604
605 if (enabled)
606 {
607 TextWidget txtUpWidget;
608 TextWidget txtDownWidget;
609 Class.CastTo(txtUpWidget, widget.FindAnyWidget(upWidget));
610 Class.CastTo(txtDownWidget, widget.FindAnyWidget(downWidget));
611
612 txtUpWidget.SetText(freq);
613 txtDownWidget.SetText("MHz");
614 widget.Show(true);
615 }
616 else
617 widget.Show(false);
618 }
619
620 protected void SetActionWidget(ActionBase action, string descText, string actionWidget, string descWidget)
621 {
622 Widget widget = m_Root.FindAnyWidget(actionWidget);
623
624 if (action && (!action.HasTarget() || (m_Player && m_Player.GetCommand_Vehicle())))
625 {
626 TextWidget actionName;
627 Class.CastTo(actionName, widget.FindAnyWidget(descWidget));
628
629
630 if (action.GetInput().GetInputType() == ActionInputType.AIT_CONTINUOUS)
631 {
632 descText = descText + " " + "#action_target_cursor_hold";
633 actionName.SetText(descText);
634 }
635 else
636 {
637 actionName.SetText(descText);
638 }
639
640 widget.Show(true);
641 }
642 else
643 {
644 widget.Show(false);
645 }
646 }
647
649 protected void SetMultipleInteractAction(string multiActionsWidget)
650 {
651 Widget widget;
652
653 widget = m_Root.FindAnyWidget(multiActionsWidget);
654 widget.Show(m_InteractActionsNum > 1);
655 }
656
658 protected void SetMultipleContinuousInteractAction(string multiActionsWidget)
659 {
660 Widget widget;
661
662 widget = m_Root.FindAnyWidget(multiActionsWidget);
663 widget.Show(m_ContinuousInteractActionsNum > 1);
664 }
665
666 protected void SetMultipleItemAction(string multiActionsWidget)
667 {
668 Widget widget;
669
670 widget = m_Root.FindAnyWidget(multiActionsWidget);
671 widget.Show(m_ItemActionsNum > 1);
672 }
673
675 protected void SetMultipleContinuousItemAction(string multiActionsWidget)
676 {
677 Widget widget;
678
679 widget = m_Root.FindAnyWidget(multiActionsWidget);
680 widget.Show(m_ContinuousItemActionsNum > 1);
681 }
682
683 protected void SetInteractActionIcon(string actionWidget, string actionIconFrameWidget, string actionIconWidget, string actionIconTextWidget)
684 {
685 string keyName = string.Empty;
686 Widget widget, frameWidget;
687 ImageWidget iconWidget;
688 TextWidget textWidget;
689
690 widget = m_Root.FindAnyWidget(actionWidget);
691 Class.CastTo(frameWidget, widget.FindAnyWidget(actionIconFrameWidget));
692 Class.CastTo(iconWidget, widget.FindAnyWidget(actionIconWidget));
693 Class.CastTo(textWidget, widget.FindAnyWidget(actionIconTextWidget));
694
695 m_UseActionWrapper.InputP().SelectAlternative(0);
696 for (int c = 0; c < m_UseActionWrapper.InputP().BindKeyCount(); c++)
697 {
698 int _hc = m_UseActionWrapper.InputP().GetBindKey(0);
699 keyName = GetUApi().GetButtonName(_hc);
700 }
701
702 // uses text in floating widget
703 iconWidget.Show(false);
704 textWidget.SetText(keyName);
705 textWidget.Show(true);
706 }
707
709 {
710 Widget w = m_Root.FindAnyWidget("ia_item_flag_icon");
711 if (m_Player && m_Player.GetHologramLocal())
712 {
713 EntityAI entity = m_Player.GetHologramLocal().GetProjectionEntity();
714 w.Show(entity.IsRefresherSignalingViable() && m_Player.IsTargetInActiveRefresherRange(entity));
715 }
716 else if (w.IsVisible())
717 {
718 w.Show(false);
719 }
720 }
721
723 {
724 ItemBase item;
725 typename actionName;
726 if (Class.CastTo(item, m_EntityInHands) && item.GetActionWidgetOverride(actionName))
727 {
728 ActionBase action = ActionManagerBase.GetAction(actionName);
729 if (action)
730 {
731 m_Single = action;
732 }
733 }
734 }
735
736 protected IngameHud GetHud()
737 {
738 Mission mission = g_Game.GetMission();
739 if (mission)
740 {
741 IngameHud hud = IngameHud.Cast(mission.GetHud());
742 return hud;
743 }
744
745 return null;
746 }
747}
void ActionBase()
Определения ActionBase.c:82
void ContinuousDefaultActionInput(PlayerBase player)
Определения ActionInput.c:630
ActionInputType
Определения ActionInput.c:2
void ActionManagerBase(PlayerBase player)
Определения ActionManagerBase.c:63
float quantityMax
Определения CfgPlayerSpawnDataJson.c:209
float quantityMin
Определения CfgPlayerSpawnDataJson.c:208
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
DayZGame g_Game
Определения DayZGame.c:4074
Mission mission
Определения DisplayStatus.c:28
DayZPlayer m_Player
Определения Hand_Events.c:42
proto native UAInputAPI GetUApi()
Super root of all classes in Enforce script.
Определения EnScript.c:11
const int COLOR_DAMAGED
Определения Colors.c:22
const int COLOR_BADLY_DAMAGED
Определения Colors.c:21
const int COLOR_FROZEN
Определения Colors.c:42
const int COLOR_PRISTINE
Определения Colors.c:24
const int COLOR_WORN
Определения Colors.c:23
const int COLOR_RUINED
Определения Colors.c:20
Определения Colors.c:4
Определения SCARH.c:98
static string GetRichtextButtonIconFromInputAction(notnull UAInput pInput, string pLocalizedDescription, int pInputDeviceType=EUAINPUT_DEVICE_CONTROLLER, float pScale=ICON_SCALE_NORMAL, bool pVertical=false)
Определения InputUtils.c:167
Определения InputUtils.c:2
Определения Feet.c:1
Определения Magnum.c:360
Определения EnMath.c:7
Mission class.
Определения gameplay.c:686
static float GetItemQuantity(InventoryItem item)
Определения QuantityConversions.c:72
static int HasItemQuantity(notnull EntityAI item)
Определения QuantityConversions.c:143
Определения gameplay.c:317
EntityAI m_EntityInHands
Определения ItemActionsWidget.c:4
Widget m_ItemLeft
Определения ItemActionsWidget.c:27
string WeaponModeTextTemp()
Определения ItemActionsWidget.c:594
void SetControllerIcon(string pWidgetName, string pInputName)
Определения ItemActionsWidget.c:72
void ShowXboxHidePCIcons(string widget, bool show_xbox_icon)
Определения ItemActionsWidget.c:78
void SetSingleXboxIcon(string imageset_name, string image_name)
Определения ItemActionsWidget.c:67
IngameHud m_Hud
Определения ItemActionsWidget.c:10
void Update(float timeslice)
Определения CTObjectFollower.c:36
void OnWidgetScriptInit(Widget w)
Определения ItemActionsWidget.c:84
void SetActionWidget(ActionBase action, string descText, string actionWidget, string descWidget)
Определения ItemActionsWidget.c:620
Widget m_Root
Определения SizeToChild.c:9
void SetContinuousXboxIcon(string imageset_name, string image_name)
Определения ItemActionsWidget.c:68
void SetMultipleContinuousItemAction(string multiActionsWidget)
shows arrows near the interact action if there are more than one available
Определения ItemActionsWidget.c:675
void UpdatePCIconsVisibility()
Contains logic for icon set switching (Gamepad/M&K)
Определения ItemActionsWidget.c:119
ref WidgetFadeTimer m_FadeTimer
Определения ContinuousActionProgress.c:10
ActionBase m_Single
Определения ItemActionsWidget.c:7
void SetContinuousInteractXboxIcon(string imageset_name, string image_name)
Определения ItemActionsWidget.c:66
void SetWeaponQuantity(int chamber, int mag, string itemWidget, string quantityPBWidget, string quantityTextWidget, bool enabled)
Определения ItemActionsWidget.c:476
void SetRadioFrequency(string freq, string itemWidget, string upWidget, string downWidget, bool enabled)
Определения ItemActionsWidget.c:599
void ~ItemActionsWidget()
Определения ItemActionsWidget.c:59
void SetMultipleContinuousInteractAction(string multiActionsWidget)
shows arrows near the interact action if there are more than one available
Определения ItemActionsWidget.c:658
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
Определения ItemActionsWidget.c:104
IngameHud GetHud()
Определения ItemActionsWidget.c:736
float GetItemQuantity(InventoryItem item)
Определения InventoryGrid.c:26
void SetInteractActionIcon(string actionWidget, string actionIconFrameWidget, string actionIconWidget, string actionIconTextWidget)
Определения ItemActionsWidget.c:683
bool GetItemFrozen()
Определения ItemActionsWidget.c:293
int m_ContinuousItemActionsNum
Определения ItemActionsWidget.c:17
void ItemActionsWidget()
Определения ItemActionsWidget.c:34
void GetEntityInHands()
Определения ItemActionsWidget.c:261
void SetItemDesc(EntityAI entity, string descText, string itemWidget, string descWidget)
Определения ItemActionsWidget.c:344
void SetXboxIcon(string name, string imageset_name, string image_name)
Определения ItemActionsWidget.c:69
void SetItemHealth(int health, string itemWidget, string healthWidget, bool enabled)
Определения ItemActionsWidget.c:362
void SetWeaponModeAndZeroing(string itemWidget, string upWidget, string downWidget, bool enabled)
Определения ItemActionsWidget.c:566
void SetItemQuantity(int type, float current, int min, int max, string itemWidget, string quantityPBWidget, string quantityTextWidget, bool enabled)
Определения ItemActionsWidget.c:425
string GetActionDesc(ActionBase action)
Определения ItemActionsWidget.c:277
void GetItemQuantity(out int q_type, out float q_cur, out int q_min, out int q_max)
Определения ItemActionsWidget.c:306
ActionManagerBase m_AM
Определения ContinuousActionProgress.c:8
int m_ContinuousInteractActionsNum
Определения ItemActionsWidget.c:15
void OnInputPresetChanged()
Определения ItemActionsWidget.c:97
void UpdateControllerInputIcons()
Loads icons from the latest keybinds.
Определения ItemActionsWidget.c:110
void CheckForActionWidgetOverrides()
Определения ItemActionsWidget.c:722
ActionBase m_Continuous
Определения ItemActionsWidget.c:8
ActionBase m_ContinuousInteract
Определения ItemActionsWidget.c:6
void CheckRefresherFlagVisibility()
Определения ItemActionsWidget.c:708
float m_MaxWidthChild
widget width
Определения ItemActionsWidget.c:30
bool m_QuantityEnabled
Определения ItemActionsWidget.c:19
UAIDWrapper m_UseActionWrapper
Определения ItemActionsWidget.c:12
string GetRadioFrequency()
Определения ItemActionsWidget.c:332
void SetMultipleItemAction(string multiActionsWidget)
Определения ItemActionsWidget.c:666
void SetMultipleInteractAction(string multiActionsWidget)
shows arrows near the interact action if there are more than one available
Определения ItemActionsWidget.c:649
int m_InteractActionsNum
Определения ItemActionsWidget.c:14
string GetItemDesc(EntityAI entity)
Определения ItemActionsWidget.c:285
void SetInteractXboxIcon(string imageset_name, string image_name)
DEPRECATED.
Определения ItemActionsWidget.c:65
ActionBase m_Interact
Определения ItemActionsWidget.c:5
Deprecated.
Определения EnWidgets.c:657
Определения EnWidgets.c:220
Определения BaseRadio.c:2
Определения UAInput.c:25
proto native UAIDWrapper GetPersistentWrapper()
proto native UAInput GetInputByID(int iID)
returns list of all bindable (i.e. visible) inputs from the active group ('core' by default)
proto native owned string GetButtonName(int iHash)
shorthand
Определения BoltActionRifle_Base.c:6
script counterpart to engine's class Weapon
Определения EnWidgets.c:190
proto string ToString(bool simple=true)
const int QUANTITY_PROGRESS
Определения 3_Game/DayZ/constants.c:555
const int QUANTITY_COUNT
Определения 3_Game/DayZ/constants.c:554
const int QUANTITY_HIDDEN
Определения 3_Game/DayZ/constants.c:553
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
const int STATE_RUINED
Определения 3_Game/DayZ/constants.c:909
const int STATE_WORN
Определения 3_Game/DayZ/constants.c:912
const int STATE_DAMAGED
Определения 3_Game/DayZ/constants.c:911
const int STATE_BADLY_DAMAGED
Определения 3_Game/DayZ/constants.c:910
const int STATE_PRISTINE
Определения 3_Game/DayZ/constants.c:913
static proto float Round(float f)
Returns mathematical round of value.
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.
proto int ToUpper()
Changes string to uppercase. Returns length.
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.
const int CALL_CATEGORY_GUI
Определения 3_Game/DayZ/tools/tools.c:9
EInputDeviceType
Определения input.c:3