DayZ 1.27
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
58
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
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())
155 {
156 SetRadioFrequency(GetRadioFrequency(), "ia_item_subdesc", "ia_item_subdesc_up", "ia_item_subdesc_down", m_QuantityEnabled);
157 GetItemQuantity(quantityType, quantityCurrent, quantityMin, quantityMax);
158 SetItemQuantity(quantityType, quantityCurrent, quantityMin, quantityMax, "ia_item", "ia_item_quantity_pb", "ia_item_quantity_text", true);
159 }
160 else
161 {
162 GetItemQuantity(quantityType, quantityCurrent, quantityMin, quantityMax);
163 SetItemQuantity(quantityType, quantityCurrent, quantityMin, quantityMax, "ia_item", "ia_item_quantity_pb", "ia_item_quantity_text", m_QuantityEnabled);
164 SetWeaponModeAndZeroing("ia_item_subdesc", "", "", false);
165 }
166
167 SetItemDesc(m_EntityInHands, GetItemDesc(m_EntityInHands), "ia_item", "ia_item_desc");
168 SetInteractActionIcon("ia_interact", "ia_interact_icon_frame", "ia_interact_btn_inner_icon", "ia_interact_btn_text");
169 SetActionWidget(m_Interact, GetActionDesc(m_Interact), "ia_interact", "ia_interact_action_name");
170
171 SetInteractActionIcon("ia_continuous_interact", "ia_continuous_interact_icon_frame", "ia_continuous_interact_btn_inner_icon", "ia_continuous_interact_btn_text");
172 SetActionWidget(m_ContinuousInteract, GetActionDesc(m_ContinuousInteract), "ia_continuous_interact", "ia_continuous_interact_action_name");
173
174 SetActionWidget(m_Single, GetActionDesc(m_Single), "ia_single", "ia_single_action_name");
175 SetActionWidget(m_Continuous, GetActionDesc(m_Continuous), "ia_continuous", "ia_continuous_action_name");
176 SetMultipleInteractAction("ia_interact_mlt_wrapper");
177 SetMultipleContinuousInteractAction("ia_continuous_interact_mlt_wrapper");
178 SetMultipleItemAction("ia_single_mlt_wrapper");
179 SetMultipleContinuousItemAction("ia_continuous_mlt_wrapper");
180 }
181
182 protected void Update()
183 {
185 if (m_Hud.GetHudVisibility().IsContextFlagActive(IngameHudVisibility.HUD_HIDE_FLAGS))
186 {
187 m_Root.Show(false);
188 return;
189 }
190
191 if (m_Player && !m_Player.IsAlive()) // handle respawn
192 {
193 m_Player = null;
194 m_AM = null;
195 }
196
197 if (!m_Player)
198 GetPlayer();
199
200 if (!m_AM)
202
203 GetActions();
205
206 if ((m_EntityInHands || !m_Hidden) && GetGame().GetUIManager().GetMenu() == null)
207 {
209 BuildCursor();
211 m_Root.Show(true);
212 }
213 else
214 m_Root.Show(false);
215
216 m_MaxWidthChild = 200;
217 }
218
219 // getters
220 protected void GetPlayer()
221 {
223 }
224
225 protected void GetActionManager()
226 {
227 if (m_Player && m_Player.IsPlayerSelected())
228 ActionManagerClient.CastTo(m_AM, m_Player.GetActionManager());
229 else
230 m_AM = null;
231 }
232
233 protected void GetActions()
234 {
235 m_Interact = null;
237 m_Single = null;
238 m_Continuous = null;
239
240 if (!m_AM)
241 return;
242
243 if (m_Player.IsSprinting())
244 return;
245
246 m_Interact = m_AM.GetPossibleAction(InteractActionInput);
248 m_Single = m_AM.GetPossibleAction(DefaultActionInput);
250
252 m_Hidden = false;
253
254 m_InteractActionsNum = m_AM.GetPossibleActionCount(InteractActionInput);
256 m_ItemActionsNum = m_AM.GetPossibleActionCount(DefaultActionInput);
258 }
259
260 protected void GetEntityInHands()
261 {
262 if (!m_Player) return;
263
264 EntityAI eai = m_Player.GetHumanInventory().GetEntityInHands();
265
266 if (eai && !eai.IsInherited(DummyItem))
267 {
268 m_EntityInHands = eai;
269 }
270 else
271 {
272 m_EntityInHands = null;
273 }
274 }
275
276 protected string GetActionDesc(ActionBase action)
277 {
278 if (action && action.GetText())
279 return action.GetText();
280
281 return string.Empty;
282 }
283
284 protected string GetItemDesc(EntityAI entity)
285 {
286 if (m_EntityInHands)
287 return m_EntityInHands.GetDisplayName();
288
289 return string.Empty;
290 }
291
292 protected bool GetItemFrozen()
293 {
294 return m_EntityInHands && m_EntityInHands.GetIsFrozen();
295 }
296
297 protected int GetItemHealth()
298 {
299 if (m_EntityInHands)
300 return m_EntityInHands.GetHealthLevel();
301
302 return -1;
303 }
304
305 protected void GetItemQuantity(out int q_type, out float q_cur, out int q_min, out int q_max)
306 {
307 if (m_EntityInHands)
308 {
311 if (q_type > 0)
312 {
313 if (q_type == QUANTITY_PROGRESS)
314 {
315 QuantityConversions.GetItemQuantity(item, q_cur, q_min, q_max);
316
317 q_cur = (q_cur / q_max);
318 // to percents
319 q_min = 0;
320 q_cur = q_cur * 100;
321 q_max = 100;
322 }
323 else
324 {
325 QuantityConversions.GetItemQuantity(item, q_cur, q_min, q_max);
326 }
327 }
328 }
329 }
330
331 protected string GetRadioFrequency()
332 {
333 TransmitterBase trans;
334 if (Class.CastTo(trans, m_EntityInHands))
335 {
336 return trans.GetTunedFrequency().ToString();
337 }
338
339 return string.Empty;
340 }
341
342 // setters
343 protected void SetItemDesc(EntityAI entity, string descText, string itemWidget, string descWidget)
344 {
345 Widget widget;
346
347 widget = m_Root.FindAnyWidget(itemWidget);
348
349 if (entity && m_Player && !m_Player.GetItemAccessor().IsItemInHandsHidden())
350 {
351 descText.ToUpper();
352 TextWidget itemName;
353 Class.CastTo(itemName, widget.FindAnyWidget(descWidget));
354 itemName.SetText(descText);
355 widget.Show(true);
356 }
357 else
358 widget.Show(false);
359 }
360
361 protected void SetItemHealth(int health, string itemWidget, string healthWidget, bool enabled)
362 {
363 Widget widget;
364
365 widget = m_Root.FindAnyWidget(itemWidget);
366
367 if (enabled)
368 {
369 ImageWidget healthMark;
370 Class.CastTo(healthMark, widget.FindAnyWidget(healthWidget));
371
372 if (m_ItemFrozen && health != GameConstants.STATE_RUINED)
373 {
374 healthMark.SetColor(Colors.COLOR_FROZEN);
375 healthMark.SetAlpha(0.5);
376 healthMark.GetParent().Show(true);
377 }
378 else
379 {
380 switch (health)
381 {
382 case -1 :
383 healthMark.GetParent().Show(false);
384 break;
386 healthMark.SetColor(Colors.COLOR_PRISTINE);
387 healthMark.SetAlpha(0.5);
388 healthMark.GetParent().Show(true);
389 break;
391 healthMark.SetColor(Colors.COLOR_WORN);
392 healthMark.SetAlpha(0.5);
393 healthMark.GetParent().Show(true);
394 break;
396 healthMark.SetColor(Colors.COLOR_DAMAGED);
397 healthMark.SetAlpha(0.5);
398 healthMark.GetParent().Show(true);
399 break;
401 healthMark.SetColor(Colors.COLOR_BADLY_DAMAGED);
402 healthMark.SetAlpha(0.5);
403 healthMark.GetParent().Show(true);
404 break;
406 healthMark.SetColor(Colors.COLOR_RUINED);
407 healthMark.SetAlpha(0.5);
408 healthMark.GetParent().Show(true);
409 break;
410 default :
411 healthMark.SetColor(0x00FFFFFF);
412 healthMark.SetAlpha(0.5);
413 healthMark.GetParent().Show(true);
414 break;
415 }
416 }
417
418 widget.Show(true);
419 }
420 else
421 widget.Show(false);
422 }
423
424 protected void SetItemQuantity(int type, float current, int min, int max, string itemWidget, string quantityPBWidget, string quantityTextWidget, bool enabled)
425 {
426 Widget widget;
427
428 widget = m_Root.FindAnyWidget(itemWidget);
429
430 if (enabled)
431 {
432 ProgressBarWidget progressBar;
433 TextWidget textWidget;
434 Class.CastTo(progressBar, widget.FindAnyWidget(quantityPBWidget));
435 Class.CastTo(textWidget, widget.FindAnyWidget(quantityTextWidget));
436
437 //check for volume vs. count and display progressbar or "bubble" with exact count/max text
438 switch (type)
439 {
440 case QUANTITY_HIDDEN :
441 progressBar.Show(false);
442 textWidget.Show(false);
443 textWidget.GetParent().Show(false);
444 break;
445 case QUANTITY_COUNT :
446 if (max > 1 || current > 1)
447 {
448 string qty_text = string.Format("%1/%2", Math.Round(current).ToString(), max.ToString());
449 progressBar.Show(false);
450 textWidget.SetText(qty_text);
451 textWidget.Show(true);
452 textWidget.GetParent().Show(true);
453 break;
454 }
455 else
456 {
457 progressBar.Show(false);
458 textWidget.Show(false);
459 textWidget.GetParent().Show(false);
460 break;
461 }
462 case QUANTITY_PROGRESS :
463 textWidget.Show(false);
464 progressBar.SetCurrent(current);
465 progressBar.Show(true);
466 textWidget.GetParent().Show(true);
467 break;
468 }
469 widget.Show(true);
470 }
471 else
472 widget.Show(false);
473 }
474
475 protected void SetWeaponQuantity(int chamber, int mag, string itemWidget, string quantityPBWidget, string quantityTextWidget, bool enabled)
476 {
477 Widget widget;
478
479 widget = m_Root.FindAnyWidget(itemWidget);
480
481 if (enabled)
482 {
483 string wpn_qty = "";
484
485 ProgressBarWidget progressBar;
486 TextWidget textWidget;
487 Class.CastTo(progressBar, widget.FindAnyWidget(quantityPBWidget));
488 Class.CastTo(textWidget, widget.FindAnyWidget(quantityTextWidget));
489
490 Weapon_Base wpn;
491 Magazine maga;
492 int mag_quantity = -1;
493
494 if (Class.CastTo(wpn, m_EntityInHands))
495 {
496 if (Magnum_Base.Cast(wpn))
497 {
498 mag_quantity = 0;
499 for (int j = 0; j < wpn.GetMuzzleCount(); j++)
500 {
501 if (wpn.IsChamberFull(j)&& !wpn.IsChamberFiredOut(j))
502 mag_quantity++;
503 }
504 wpn_qty = mag_quantity.ToString();
505 }
506 else
507 {
508 for (int i = 0; i < wpn.GetMuzzleCount(); i++)
509 {
510 if (i > 0 && (wpn.GetMuzzleCount() < 3 || i%2 == 0))
511 {
512 wpn_qty = wpn_qty + " ";
513 }
514 if (wpn.IsChamberEmpty(i))
515 {
516 wpn_qty = wpn_qty + "0";
517 }
518 else if (wpn.IsChamberFiredOut(i))
519 {
520 wpn_qty = wpn_qty + "F";
521 }
522 else
523 {
524 wpn_qty = wpn_qty + "1";
525 }
526
527 maga = wpn.GetMagazine(i);
528 if (maga)
529 {
530 mag_quantity = maga.GetAmmoCount();
531 }
532 else if (wpn.GetInternalMagazineMaxCartridgeCount(i) > 0)
533 {
534 mag_quantity = wpn.GetInternalMagazineCartridgeCount(i);
535 }
536
537 }
538
539 if (wpn.IsJammed())
540 {
541 if (mag_quantity != -1)
542 wpn_qty = string.Format("X (+%1)", mag_quantity);
543 else
544 wpn_qty = "X";
545 }
546 else
547 {
548 if (mag_quantity != -1)
549 {
550 wpn_qty = wpn_qty + " (" + mag_quantity.ToString() + ")";
551 }
552 }
553 }
554 }
555
556 progressBar.Show(false);
557 textWidget.SetText(wpn_qty);
558 textWidget.Show(true);
559 textWidget.GetParent().Show(true);
560 }
561 else
562 widget.Show(false);
563 }
564
565 protected void SetWeaponModeAndZeroing(string itemWidget, string upWidget, string downWidget, bool enabled)
566 {
567 Widget widget;
568
569 widget = m_Root.FindAnyWidget(itemWidget);
570
571 if (enabled && m_Player)
572 {
573 TextWidget txtModeWidget;
574 TextWidget txtZeroingWidget;
575
576 Class.CastTo(txtModeWidget, widget.FindAnyWidget(upWidget));
577 Class.CastTo(txtZeroingWidget, widget.FindAnyWidget(downWidget));
578
579 Weapon w = Weapon.Cast(m_Player.GetHumanInventory().GetEntityInHands());
580 string zeroing = string.Empty;
581 if (w)
582 zeroing = string.Format("%1 m", w.GetCurrentZeroing(w.GetCurrentMuzzle()));
583
584 txtModeWidget.SetText(m_Player.GetWeaponManager().GetCurrentModeName());
585 txtZeroingWidget.SetText(zeroing);
586 widget.Show(true);
587 }
588 else
589 widget.Show(false);
590 }
591
592 // not used instead of this is used confing parameter for fire mode
593 protected string WeaponModeTextTemp()
594 {
595 return "unused";
596 }
597
598 protected void SetRadioFrequency(string freq, string itemWidget, string upWidget, string downWidget, bool enabled)
599 {
600 Widget widget;
601
602 widget = m_Root.FindAnyWidget(itemWidget);
603
604 if (enabled)
605 {
606 TextWidget txtUpWidget;
607 TextWidget txtDownWidget;
608 Class.CastTo(txtUpWidget, widget.FindAnyWidget(upWidget));
609 Class.CastTo(txtDownWidget, widget.FindAnyWidget(downWidget));
610
611 txtUpWidget.SetText(freq);
612 txtDownWidget.SetText("MHz");
613 widget.Show(true);
614 }
615 else
616 widget.Show(false);
617 }
618
619 protected void SetActionWidget(ActionBase action, string descText, string actionWidget, string descWidget)
620 {
621 Widget widget = m_Root.FindAnyWidget(actionWidget);
622
623 if (action && (!action.HasTarget() || (m_Player && m_Player.GetCommand_Vehicle())))
624 {
625 TextWidget actionName;
626 Class.CastTo(actionName, widget.FindAnyWidget(descWidget));
627
628
629 if (action.GetInput().GetInputType() == ActionInputType.AIT_CONTINUOUS)
630 {
631 descText = descText + " " + "#action_target_cursor_hold";
632 actionName.SetText(descText);
633 }
634 else
635 {
636 actionName.SetText(descText);
637 }
638
639 widget.Show(true);
640 }
641 else
642 {
643 widget.Show(false);
644 }
645 }
646
648 protected void SetMultipleInteractAction(string multiActionsWidget)
649 {
650 Widget widget;
651
652 widget = m_Root.FindAnyWidget(multiActionsWidget);
653 widget.Show(m_InteractActionsNum > 1);
654 }
655
657 protected void SetMultipleContinuousInteractAction(string multiActionsWidget)
658 {
659 Widget widget;
660
661 widget = m_Root.FindAnyWidget(multiActionsWidget);
662 widget.Show(m_ContinuousInteractActionsNum > 1);
663 }
664
665 protected void SetMultipleItemAction(string multiActionsWidget)
666 {
667 Widget widget;
668
669 widget = m_Root.FindAnyWidget(multiActionsWidget);
670 widget.Show(m_ItemActionsNum > 1);
671 }
672
674 protected void SetMultipleContinuousItemAction(string multiActionsWidget)
675 {
676 Widget widget;
677
678 widget = m_Root.FindAnyWidget(multiActionsWidget);
679 widget.Show(m_ContinuousItemActionsNum > 1);
680 }
681
682 protected void SetInteractActionIcon(string actionWidget, string actionIconFrameWidget, string actionIconWidget, string actionIconTextWidget)
683 {
684 string keyName = string.Empty;
685 Widget widget, frameWidget;
686 ImageWidget iconWidget;
687 TextWidget textWidget;
688
689 widget = m_Root.FindAnyWidget(actionWidget);
690 Class.CastTo(frameWidget, widget.FindAnyWidget(actionIconFrameWidget));
691 Class.CastTo(iconWidget, widget.FindAnyWidget(actionIconWidget));
692 Class.CastTo(textWidget, widget.FindAnyWidget(actionIconTextWidget));
693
694 m_UseActionWrapper.InputP().SelectAlternative(0);
695 for (int c = 0; c < m_UseActionWrapper.InputP().BindKeyCount(); c++)
696 {
697 int _hc = m_UseActionWrapper.InputP().GetBindKey(0);
698 keyName = GetUApi().GetButtonName(_hc);
699 }
700
701 // uses text in floating widget
702 iconWidget.Show(false);
703 textWidget.SetText(keyName);
704 textWidget.Show(true);
705 }
706
708 {
709 Widget w = m_Root.FindAnyWidget("ia_item_flag_icon");
710 if (m_Player && m_Player.GetHologramLocal())
711 {
712 EntityAI entity = m_Player.GetHologramLocal().GetProjectionEntity();
713 w.Show(entity.IsRefresherSignalingViable() && m_Player.IsTargetInActiveRefresherRange(entity));
714 }
715 else if (w.IsVisible())
716 {
717 w.Show(false);
718 }
719 }
720
722 {
723 ItemBase item;
724 typename actionName;
725 if (Class.CastTo(item, m_EntityInHands) && item.GetActionWidgetOverride(actionName))
726 {
727 ActionBase action = ActionManagerBase.GetAction(actionName);
728 if (action)
729 {
730 m_Single = action;
731 }
732 }
733 }
734
735 protected IngameHud GetHud()
736 {
738 if (mission)
739 {
740 IngameHud hud = IngameHud.Cast(mission.GetHud());
741 return hud;
742 }
743
744 return null;
745 }
746}
void ContinuousDefaultActionInput(PlayerBase player)
Определения ActionInput.c:607
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
Mission mission
Определения DisplayStatus.c:28
DayZPlayer m_Player
Определения Hand_Events.c:42
proto native UAInputAPI GetUApi()
bool HasTarget()
Определения ActionBase.c:244
ActionInput GetInput()
Определения ActionBase.c:1311
string GetText()
Определения ActionBase.c:298
Определения ActionBase.c:53
int GetInputType()
Определения ActionInput.c:89
override ScriptInvoker GetUpdateQueue(int call_category)
Определения DayZGame.c:1192
proto native Input GetInput()
proto native Mission GetMission()
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
Определения Magnum.c:398
Определения Building.c:6
Определения constants.c:659
proto native EInputDeviceType GetCurrentInputDevice()
proto native bool IsEnabledMouseAndKeyboardEvenOnServer()
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
Определения ItemBase.c:15
Определения InventoryItem.c:731
Определения Magnum.c:357
Определения EnMath.c:7
ScriptInvoker GetOnInputDeviceChanged()
Определения gameplay.c:851
ScriptInvoker GetOnInputPresetChanged()
Определения gameplay.c:859
Mission class.
Определения gameplay.c:687
static float GetItemQuantity(InventoryItem item)
Определения QuantityConversions.c:72
static int HasItemQuantity(notnull EntityAI item)
Определения QuantityConversions.c:143
Определения gameplay.c:317
proto bool Remove(func fn, int flags=EScriptInvokerRemoveFlags.ALL)
remove specific call from list
proto bool Insert(func fn, int flags=EScriptInvokerInsertFlags.IMMEDIATE)
insert method to list
EntityAI m_EntityInHands
Определения ItemActionsWidget.c:4
Widget m_ItemLeft
Определения ItemActionsWidget.c:27
string WeaponModeTextTemp()
Определения ItemActionsWidget.c:593
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:619
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:674
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:475
void SetRadioFrequency(string freq, string itemWidget, string upWidget, string downWidget, bool enabled)
Определения ItemActionsWidget.c:598
void ~ItemActionsWidget()
Определения ItemActionsWidget.c:59
void SetMultipleContinuousInteractAction(string multiActionsWidget)
shows arrows near the interact action if there are more than one available
Определения ItemActionsWidget.c:657
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
Определения ItemActionsWidget.c:104
IngameHud GetHud()
Определения ItemActionsWidget.c:735
float GetItemQuantity(InventoryItem item)
Определения InventoryGrid.c:26
void SetInteractActionIcon(string actionWidget, string actionIconFrameWidget, string actionIconWidget, string actionIconTextWidget)
Определения ItemActionsWidget.c:682
bool GetItemFrozen()
Определения ItemActionsWidget.c:292
int m_ContinuousItemActionsNum
Определения ItemActionsWidget.c:17
void ItemActionsWidget()
Определения ItemActionsWidget.c:34
void GetEntityInHands()
Определения ItemActionsWidget.c:260
void SetItemDesc(EntityAI entity, string descText, string itemWidget, string descWidget)
Определения ItemActionsWidget.c:343
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:361
void SetWeaponModeAndZeroing(string itemWidget, string upWidget, string downWidget, bool enabled)
Определения ItemActionsWidget.c:565
void SetItemQuantity(int type, float current, int min, int max, string itemWidget, string quantityPBWidget, string quantityTextWidget, bool enabled)
Определения ItemActionsWidget.c:424
string GetActionDesc(ActionBase action)
Определения ItemActionsWidget.c:276
void GetItemQuantity(out int q_type, out float q_cur, out int q_min, out int q_max)
Определения ItemActionsWidget.c:305
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:721
ActionBase m_Continuous
Определения ItemActionsWidget.c:8
ActionBase m_ContinuousInteract
Определения ItemActionsWidget.c:6
void CheckRefresherFlagVisibility()
Определения ItemActionsWidget.c:707
float m_MaxWidthChild
widget width
Определения ItemActionsWidget.c:30
bool m_QuantityEnabled
Определения ItemActionsWidget.c:19
UAIDWrapper m_UseActionWrapper
Определения ItemActionsWidget.c:12
string GetRadioFrequency()
Определения ItemActionsWidget.c:331
void SetMultipleItemAction(string multiActionsWidget)
Определения ItemActionsWidget.c:665
void SetMultipleInteractAction(string multiActionsWidget)
shows arrows near the interact action if there are more than one available
Определения ItemActionsWidget.c:648
int m_InteractActionsNum
Определения ItemActionsWidget.c:14
string GetItemDesc(EntityAI entity)
Определения ItemActionsWidget.c:284
void SetInteractXboxIcon(string imageset_name, string image_name)
DEPRECATED.
Определения ItemActionsWidget.c:65
ActionBase m_Interact
Определения ItemActionsWidget.c:5
map: item x vector(index, width, height)
Определения EnWidgets.c:651
Определения EnWidgets.c:220
Определения BaseRadio.c:2
Определения UAInput.c:15
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
Определения InventoryItem.c:49
Определения EnWidgets.c:190
proto string ToString(bool simple=true)
proto native CGame GetGame()
const int QUANTITY_PROGRESS
Определения constants.c:516
const int QUANTITY_COUNT
Определения constants.c:515
const int QUANTITY_HIDDEN
Определения constants.c:514
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
const int STATE_RUINED
Определения constants.c:846
const int STATE_WORN
Определения constants.c:849
const int STATE_DAMAGED
Определения constants.c:848
const int STATE_BADLY_DAMAGED
Определения constants.c:847
const int STATE_PRISTINE
Определения constants.c:850
static proto float Round(float f)
Returns mathematical round of value.
proto int ToUpper()
Changes string to uppercase. Returns length.
static const string Empty
Определения EnString.c:7
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
Определения tools.c:9
EInputDeviceType
Определения input.c:3