DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
SlotsIcon.c
См. документацию.
2{
3 protected static int m_NormalWidth;
4 protected static int m_NormalHeight;
5
6 protected bool m_IsWeapon = false;
7 protected bool m_IsMagazine = false;
8 protected bool m_HasTemperature = false;
9 protected bool m_HasQuantity = false;
10 protected bool m_HasItemSize = false;
11 protected float m_CurrQuantity = -1;
12
13 protected EntityAI m_Obj;
14 protected ItemBase m_Item;
17 protected int m_SlotID;
18 protected bool m_IsDragged = false;
19
21
27
29 protected ImageWidget m_GhostSlot;
30
35
38 protected ProgressBarWidget m_QuantityProgress;
40
41 protected string m_SlotDisplayName;
42 protected string m_SlotDesc;
43
46
50
51 protected bool m_Reserved;
52
53 protected ImageWidget m_AmmoIcon;
55
56 void SlotsIcon( LayoutHolder parent, Widget root, int index, EntityAI slot_parent )
57 {
58 m_MainWidget = root;
59
60 m_PanelWidget = m_MainWidget.FindAnyWidget( "PanelWidget" + index );
61
62 m_CursorWidget = m_MainWidget.FindAnyWidget( "Cursor" + index );
63 m_ColWidget = m_MainWidget.FindAnyWidget( "Col" + index );
64 m_MountedWidget = m_MainWidget.FindAnyWidget( "Mounted" + index );
65 m_OutOfReachWidget = m_MainWidget.FindAnyWidget( "OutOfReach" + index );
66
67 m_ItemPreview = ItemPreviewWidget.Cast( m_MainWidget.FindAnyWidget( "Render" + index ) );
68 m_ItemPreview.SetForceFlipEnable(true);
69 m_ItemPreview.SetForceFlip(false);
70
71 m_GhostSlot = ImageWidget.Cast( m_MainWidget.FindAnyWidget( "GhostSlot" + index ) );
72
73 m_ColorWidget = m_MainWidget.FindAnyWidget( "Color" + index );
74 m_SelectedPanel = m_MainWidget.FindAnyWidget( "Selected" + index );
75 m_EmptySelectedPanel = m_MainWidget.FindAnyWidget( "EmptySelected" + index );
76 m_MicromanagedPanel = m_MainWidget.FindAnyWidget( "Micromanaged" + index );
77
78 m_QuantityPanel = m_MainWidget.FindAnyWidget( "QuantityPanel" + index );
79 m_QuantityItem = TextWidget.Cast( m_MainWidget.FindAnyWidget( "Quantity" + index ) );
80 m_QuantityProgress = ProgressBarWidget.Cast( m_MainWidget.FindAnyWidget( "QuantityBar" + index ) );
81 m_QuantityStack = m_MainWidget.FindAnyWidget( "QuantityStackPanel" + index );
82
83 m_ItemSizePanel = m_MainWidget.FindAnyWidget( "ItemSizePanel" + index );
84 m_ItemSizeWidget = TextWidget.Cast( m_MainWidget.FindAnyWidget( "ItemSize" + index ) );
85
86 m_AmmoIcon = ImageWidget.Cast(m_MainWidget.FindAnyWidget( "AmmoIcon" + index ));
87
88 m_RadialIconPanel = m_MainWidget.FindAnyWidget( "RadialIconPanel" + index );
89 m_RadialIconClosed = m_MainWidget.FindAnyWidget( "RadialIconClosed" + index );
90 m_RadialIcon = m_MainWidget.FindAnyWidget( "RadialIcon" + index );
91
92 m_ReservedWidget = Widget.Cast( GetGame().GetWorkspace().CreateWidgets( "gui/layouts/inventory_new/reserved_icon.layout", m_MainWidget ) );
93 m_ReservedWidget.Show(false);
94
97
98 WidgetEventHandler.GetInstance().RegisterOnMouseEnter( m_GhostSlot, this, "MouseEnterGhostSlot" );
99 WidgetEventHandler.GetInstance().RegisterOnMouseLeave( m_GhostSlot, this, "MouseLeaveGhostSlot" );
100
103
106
107 m_Reserved = false;
108 m_SlotID = -1;
109 m_Item = null;
110 m_Obj = null;
111 m_Container = null;
112
113 m_SlotParent = slot_parent;
114
115 m_PanelWidget.SetUserData(this);
116 m_ItemPreview.SetUserData(this);
117 m_GhostSlot.SetUserData(this);
118 m_MainWidget.SetUserData(this);
119
120 float w,h;
121 root.GetSize(w,h);
122
123 m_NormalWidth = w;
124 m_NormalHeight = h;
125
126 SetActive( false );
127 }
128
129 override bool IsVisible()
130 {
131 return m_MainWidget.IsVisible();
132 }
133
135 {
136 m_SlotParent = parent;
137 }
138
139 void SetContainer( Container container )
140 {
141 m_Container = container;
142 }
143
144 void SetSlotDisplayName( string text )
145 {
146 m_SlotDisplayName = text;
147 }
148
150 {
151 return m_Container;
152 }
153
155 {
156 return m_SlotDisplayName;
157 }
158
159 void SetSlotDesc( string text )
160 {
161 m_SlotDesc = text;
162 }
163
164 string GetSlotDesc()
165 {
166 return m_SlotDesc;
167 }
168
170 {
171 if (m_IsDragged)
172 {
173 m_IsDragged = false;
176 }
177
178 if (m_Obj)
179 {
180 m_Obj.GetOnItemFlipped().Remove( UpdateFlip );
181 m_Obj.GetOnViewIndexChanged().Remove( SetItemPreview );
182 }
183 }
184
186 {
187 return m_SlotParent;
188 }
189
191 {
192 return m_SlotID;
193 }
194
195 void SetSlotID(int slot_ID)
196 {
197 m_SlotID = slot_ID;
198 }
199
201 {
202 return m_Reserved;
203 }
204
206 {
207 return m_PanelWidget;
208 }
209
211 {
212 return m_CursorWidget;
213 }
214
216 {
217 return m_ColWidget;
218 }
219
221 {
222 return m_ReservedWidget;
223 }
224
226 {
227 return m_MountedWidget;
228 }
229
231 {
232 return m_ItemPreview;
233 }
234
235 ImageWidget GetGhostSlot()
236 {
237 return m_GhostSlot;
238 }
239
241 {
242 return m_ColorWidget;
243 }
244
246 {
247 return m_SelectedPanel;
248 }
249
254
259
261 {
262 return m_QuantityPanel;
263 }
264
269
271 {
272 return m_QuantityItem;
273 }
274
275 ProgressBarWidget GetQuantityProgress()
276 {
277 return m_QuantityProgress;
278 }
279
281 {
282 return m_QuantityStack;
283 }
284
286 {
287 return m_ItemSizePanel;
288 }
289
294
295 ImageWidget GetAmmoIcon()
296 {
297 return m_AmmoIcon;
298 }
299
301 {
302 return m_RadialIconPanel;
303 }
304
309
311 {
312 return m_RadialIcon;
313 }
314
316 {
317 return GetCursorWidget().IsVisible();
318 }
319
320 override void SetActive( bool active )
321 {
322#ifdef PLATFORM_CONSOLE
323 super.SetActive( active );
324 float x, y;
325 if( active && GetObject() )
326 {
327 GetMainWidget().GetScreenPos( x, y );
328 PrepareOwnedTooltip( EntityAI.Cast( GetObject() ), x, y );
329 }
330 else if (active)
331 {
332 GetMainWidget().GetScreenPos( x, y );
333 PrepareOwnedSlotsTooltip( GetMainWidget(), m_SlotDisplayName, m_SlotDesc, x, y );
334 }
335
336 m_SelectedPanel.Show( active );
337#endif
338 }
339
340 override void SetLayoutName()
341 {
342 m_LayoutName = "";
343 }
344
345 override void Refresh()
346 {
347 //if (m_HasTemperature)
349 if (m_IsWeapon)
351 if (m_HasQuantity)
352 SetQuantity();
353 }
354
359
361 {
362 return m_Obj;
363 }
364
366 {
367 return EntityAI.Cast( m_Obj );
368 }
369
371 {
372 return m_Item;
373 }
374
376 {
377 Weapon_Base wpn = Weapon_Base.Cast(GetObject());
378 if (wpn)
379 {
380 int i;
381 if (!wpn.IsShowingChamberedBullet())
382 {
383 for (i = 0; i < m_AmmoIcons.Count(); i++)
384 m_AmmoIcon = m_AmmoIcons.Get(i);
385 }
386 else
387 {
388 for (i = 0; i < wpn.GetMuzzleCount(); i++)
389 {
390 if (i > m_AmmoIcons.Count())
391 break;
392
393 m_AmmoIcon = m_AmmoIcons.Get(i);
394 if (wpn.IsChamberFull(i))
395 {
396 m_AmmoIcon.Show(true);
397 if (wpn.IsJammed())
398 {
399 m_AmmoIcon.Show(true);
400 m_AmmoIcon.SetImage(2);
401 }
402 else if (wpn.IsChamberFiredOut(i))
403 {
404 m_AmmoIcon.Show(true);
405 m_AmmoIcon.SetImage(1);
406 }
407 else
408 {
409 m_AmmoIcon.Show(true);
410 m_AmmoIcon.SetImage(0);
411 }
412 }
413 else
414 {
415 m_AmmoIcon.Show(false);
416 }
417 }
418 }
419 }
420 }
421
423 {
424 if (m_Item)
425 {
426 int quantityType = QuantityConversions.HasItemQuantity(m_Item);
428 {
430
431 if (quantityType == QUANTITY_COUNT)
432 {
433 string q_text = QuantityConversions.GetItemQuantityText(m_Item, true);
434
435 if (QuantityConversions.GetItemQuantityMax(m_Item) == 1 || q_text == "")
436 {
437 m_QuantityStack.Show(false);
438 }
439 else
440 {
441 m_QuantityItem.SetText(q_text);
442 m_QuantityStack.Show(true);
443 }
444
445 m_QuantityProgress.Show(false);
446 }
447 else if (quantityType == QUANTITY_PROGRESS)
448 {
449 float progress_max = m_QuantityProgress.GetMax();
450 int max = m_Item.GetQuantityMax();
451 int count = m_Item.ConfigGetInt("count");
452 float quantity = m_CurrQuantity;
453
454 if (count > 0)
455 {
456 max = count;
457 }
458
459 if (max > 0)
460 {
461 float value = Math.Round((quantity / max) * 100);
462 m_QuantityProgress.SetCurrent(value);
463 }
464 m_QuantityStack.Show(false);
465 m_QuantityProgress.Show(true);
466 }
467 }
468 }
469 }
470
472 {
473 m_ItemPreview.Show( true );
474 m_ItemPreview.SetItem( EntityAI.Cast( m_Obj ) );
475 m_ItemPreview.SetModelOrientation( "0 0 0" );
476 m_ItemPreview.SetView( m_Obj.GetViewIndex() );
477 }
478
480 {
481 if( m_HasItemSize )
482 {
483 int size_x, size_y;
484 GetGame().GetInventoryItemSize( InventoryItem.Cast( m_Obj ), size_x, size_y );
485
486 m_ItemSizePanel.Show( true );
487 m_ItemSizeWidget.SetText( ( size_x * size_y ).ToString() );
488 }
489 }
490
491 void UpdateFlip( bool flipped )
492 {
493 if( !m_Reserved )
494 {
495 float x_content, y_content;
496 GetPanelWidget().GetScreenSize( x_content, y_content );
497 GetPanelWidget().SetSize( y_content, x_content );
498 }
499 }
500
501 void Init( EntityAI obj, bool reservation = false )
502 {
503 if( m_Obj != obj )
504 {
506 m_Obj = obj;
507 m_Item = ItemBase.Cast( m_Obj );
508 m_Obj.GetOnItemFlipped().Insert( UpdateFlip );
509 m_Obj.GetOnViewIndexChanged().Insert( SetItemPreview );
510 m_Reserved = reservation;
511 m_Container = null;
512
513 if(reservation)
514 {
516
517 m_IsWeapon = false;
518 m_IsMagazine = false;
519 m_HasTemperature = false;
520 m_HasQuantity = false;
521 m_HasItemSize = false;
522 }
523 else
524 {
530 }
531
532 m_ReservedWidget.Show(reservation);
533
535
536 m_GhostSlot.Show( false );
537 m_PanelWidget.Show( true );
538
539 Refresh();
540#ifdef PLATFORM_CONSOLE
541 if ( IsFocused() )
542 {
543 Inventory.GetInstance().UpdateConsoleToolbar();
544 }
545#endif
546 }
547 }
548
550 {
551 if (m_IsDragged)
552 {
556 }
557 if (m_Obj)
558 {
559 m_Obj.GetOnItemFlipped().Remove( UpdateFlip );
560 m_Obj.GetOnViewIndexChanged().Remove( SetItemPreview );
561 HideOwnedTooltip();
562 }
563
564 m_Obj = null;
565 m_Item = null;
566 m_Container = null;
567
568 m_ItemPreview.Show( false );
569 m_ItemPreview.SetItem( null );
570
571 m_CurrQuantity = -1;
572 m_IsWeapon = false;
573 m_IsMagazine = false;
574 m_HasTemperature = false;
575 m_HasQuantity = false;
576 m_HasItemSize = false;
577
578 m_GhostSlot.Show( true );
579 m_AmmoIcon.Show( false );
580 m_PanelWidget.Show( false );
581 m_RadialIconPanel.Show( false );
582
583 m_QuantityPanel.Show( false );
584 if(GetSlotID() != -1)
585 {
586 int stack_max = InventorySlots.GetStackMaxForSlotId( GetSlotID() );
587 if(stack_max > 1)
588 {
589 m_QuantityPanel.Show( true );
590 m_QuantityItem.SetText( string.Format("0/%1", stack_max.ToString()) );
591 m_QuantityStack.Show( true );
592 m_QuantityProgress.Show( false );
593 m_PanelWidget.Show( true );
594 m_ItemPreview.Show( true );
595 }
596 }
597
598 m_ColWidget.Show( false );
599 m_MountedWidget.Show( false );
600 m_OutOfReachWidget.Show( false );
601 m_ReservedWidget.Show( false );
602
603 if( m_ItemSizePanel )
604 m_ItemSizePanel.Show( false );
605
606 if( m_ColorWidget )
607 m_ColorWidget.Show( false );
608
609 Refresh();
610 }
611
612 void Clear()
613 {
614 #ifdef PLATFORM_CONSOLE
615 m_SelectedPanel.Show(false);
616 #endif
617 m_CursorWidget.Show(false);
618 m_EmptySelectedPanel.Show(false);
619
621 }
622
624 {
625 Weapon_Base wpn = Weapon_Base.Cast(m_Obj);
626 if (wpn)
627 {
629 m_IsWeapon = true;
630 float posX = 0.0;
631 float width = 0.0, height = 0.0;
632 for (int i = 0; i < wpn.GetMuzzleCount(); i++)
633 {
634 if (i == 1)
635 {
636 m_AmmoIcons[0].GetSize(width,height);
637 }
638 posX += width;
639
640 m_AmmoIcon.SetPos(posX, 0.0, false);
641
642 AmmoData data = Magazine.GetAmmoData(wpn.GetChamberAmmoTypeName(i));
643 if (data)
644 {
645 CartridgeType cartridgeType = data.m_CartridgeType;
646 switch (cartridgeType)
647 {
648 case CartridgeType.Pistol:
649 {
650 m_AmmoIcon.LoadImageFile(0, "set:dayz_gui image:cartridge_pistol");
651 m_AmmoIcon.LoadImageFile(1, "set:dayz_gui image:shell_pistol");
652 m_AmmoIcon.LoadImageFile(2, "set:dayz_gui image:jam_pistol");
653 break;
654 }
655 case CartridgeType.Intermediate:
656 {
657 m_AmmoIcon.LoadImageFile(0, "set:dayz_gui image:cartridge_int");
658 m_AmmoIcon.LoadImageFile(1, "set:dayz_gui image:shell_int");
659 m_AmmoIcon.LoadImageFile(2, "set:dayz_gui image:jam_int");
660 break;
661 }
662 case CartridgeType.FullPower:
663 {
664 m_AmmoIcon.LoadImageFile(0, "set:dayz_gui image:cartridge_fp");
665 m_AmmoIcon.LoadImageFile(1, "set:dayz_gui image:shell_fp");
666 m_AmmoIcon.LoadImageFile(2, "set:dayz_gui image:jam_fp");
667 break;
668 }
669 case CartridgeType.Shell:
670 {
671 m_AmmoIcon.LoadImageFile(0, "set:dayz_gui image:cartridge_shell");
672 m_AmmoIcon.LoadImageFile(1, "set:dayz_gui image:shell_shell");
673 m_AmmoIcon.LoadImageFile(2, "set:dayz_gui image:jam_shell");
674 break;
675 }
676 //@note: Crossbows cant jam so we dont add a icon for the jam state
677 case CartridgeType.Arrow:
678 {
679 m_AmmoIcon.LoadImageFile(0, "set:dayz_gui image:arrow_int");
680 m_AmmoIcon.LoadImageFile(1, "set:dayz_gui image:arrow_int");
681 break;
682 }
683 }
684 }
685 m_AmmoIcons.Insert(m_AmmoIcon);
686 }
687 }
688 else
689 {
690 m_IsWeapon = false;
691 }
692 }
693
695 {
696 m_IsMagazine = ( Magazine.Cast( m_Obj ) != null );
697 }
698
700 {
701 if (m_Item)
702 {
703 m_HasTemperature = m_Item.CanHaveTemperature();
704 }
705 }
706
708 {
709 if( m_Item )
710 {
712 if( m_HasQuantity )
713 {
714 m_QuantityPanel.Show( true );
715 }
716 }
717 }
718
720 {
721 #ifdef PLATFORM_CONSOLE
722 string config = "CfgVehicles " + m_Obj.GetType() + " GUIInventoryAttachmentsProps";
723 m_HasItemSize = ( InventoryItem.Cast( m_Obj ) && !GetGame().ConfigIsExisting( config ) );
724 #else
725 m_HasItemSize = false;
726 #endif
727 }
728
730 {
731 bool oot = ( m_OutOfReachWidget.IsVisible() || m_MountedWidget.IsVisible() );
732 return oot;
733 }
734
735 bool MouseEnter(Widget w, int x, int y)
736 {
737 if( m_Reserved )
738 return MouseEnterGhostSlot(w, x, y);
739
740 PrepareOwnedTooltip( m_Item, x, y );
742 {
743 m_CursorWidget.Show( true );
744 }
745 return true;
746 }
747
748 bool MouseEnterGhostSlot(Widget w, int x, int y)
749 {
750 float pos_x, pos_y;
751 m_MainWidget.GetScreenPos(pos_x, pos_y);
752
753 x = pos_x;
754 y = pos_y;
755
756 PrepareOwnedSlotsTooltip( m_MainWidget, m_SlotDisplayName, m_SlotDesc, x, y );
758 {
759 m_EmptySelectedPanel.Show( true );
760 }
761
762
763 return true;
764 }
765
766 bool MouseLeave( Widget w, Widget s, int x, int y )
767 {
768 if( m_Reserved )
769 return MouseLeaveGhostSlot(w, s, x, y);
770
771 HideOwnedTooltip();
773 {
774 m_CursorWidget.Show( false );
775 }
776 return true;
777 }
778
779 bool MouseLeaveGhostSlot( Widget w, Widget s, int x, int y )
780 {
781 HideOwnedSlotsTooltip();
782
784 {
785 m_EmptySelectedPanel.Show( false );
786 }
787
788 return true;
789 }
790
791 override void UpdateInterval()
792 {
793 if (m_Item)
794 {
797 if (m_IsWeapon)
799 if (m_HasQuantity)
800 SetQuantity();
801 if (m_HasItemSize)
802 SetItemSize();
803 }
804 }
805
807 {
808 if(!m_Obj || !w)
809 {
810 return;
811 }
813 if( m_Obj.GetHierarchyRootPlayer() == GetGame().GetPlayer() )
814 {
815 ItemManager.GetInstance().GetRightDropzone().SetAlpha( 1 );
816 }
817 else
818 {
819 ItemManager.GetInstance().GetLeftDropzone().SetAlpha( 1 );
820 }
821
823 int icon_x, icon_y;
824 float icon_size, y;
825 int m_sizeX, m_sizeY;
826
827 if( m_Item )
828 {
829 GetGame().GetInventoryItemSize( m_Item, icon_x, icon_y );
830
831 CargoContainer c_parent = CargoContainer.Cast( m_Parent );
832 HandsPreview h_parent = HandsPreview.Cast( m_Parent );
833
834 if( GetRoot().m_MainWidget.FindAnyWidget( "HandsPanel" ) )
835 {
836 GetRoot().m_MainWidget.FindAnyWidget( "HandsPanel" ).GetScreenSize( icon_size, y );
837 }
838
839 icon_size = icon_size / 10;
840
841 w.SetFlags( WidgetFlags.EXACTSIZE );
842 m_ItemPreview.SetForceFlipEnable(false);
843
844 if( !m_Item.GetInventory().GetFlipCargo() )
845 {
846 w.SetSize( icon_x * icon_size , icon_y * icon_size );
847 }
848 else
849 {
850 w.SetSize( icon_y * icon_size , icon_x * icon_size );
851 }
852
853 m_ColWidget.Show( true );
854 m_CursorWidget.Show( true );
855
857 }
858 m_IsDragged = true;
859 }
860
862 {
863 m_IsDragged = false;
866 w.ClearFlags( WidgetFlags.EXACTSIZE );
867 w.SetSize( 1, 1 );
868 m_ColWidget.Show( false );
869 m_CursorWidget.Show( false );
870 m_EmptySelectedPanel.Show( false );
871 m_CursorWidget.SetColor( ARGBF( 1, 1, 1, 1 ) );
872 m_ItemPreview.SetForceFlipEnable(true);
873 }
874
875 static int GetNormalWidth()
876 {
877 return m_NormalWidth;
878 }
879
880 static int GetNormalHeight()
881 {
882 return m_NormalHeight;
883 }
884
885 /*override void HideOwnedSlotsTooltip()
886 {
887 if (m_TooltipOwner)
888 {
889 ItemManager.GetInstance().HideTooltipSlot();
890 m_TooltipOwner = false;
891 }
892 }*/
893}
void Inventory(LayoutHolder parent)
Определения Inventory.c:74
proto string ToString()
Icon x
Icon y
CartridgeType
Определения Magazine.c:4
PlayerBase GetPlayer()
Определения ModifierBase.c:51
Widget m_Parent
Определения SizeToChild.c:92
void SetActive()
Определения TrapBase.c:414
proto void GetInventoryItemSize(InventoryItem item, out int width, out int height)
Определения Building.c:6
Определения HandsPreview.c:2
Определения ItemBase.c:15
static proto native int GetStackMaxForSlotId(int slot_Id)
provides access to slot configuration
Определения InventorySlots.c:6
Определения InventoryItem.c:731
void SetTemperature(EntityAI item, Widget item_w)
Определения ItemManager.c:479
Widget GetLeftDropzone()
Определения ItemManager.c:336
void SetDraggedItem(EntityAI dragged_item)
Определения ItemManager.c:363
Widget GetRightDropzone()
Определения ItemManager.c:344
void HideDropzones()
Определения ItemManager.c:287
void SetWidgetDraggable(Widget w, bool draggable)
Определения ItemManager.c:693
void SetIsDragging(bool is_dragging)
Определения ItemManager.c:383
static ItemManager GetInstance()
Определения ItemManager.c:282
Определения ItemManager.c:2
Определения gameplay.c:277
void Container(LayoutHolder parent)
Определения Container.c:35
Определения Container.c:2
Определения EnMath.c:7
Определения ObjectTyped.c:2
static float GetItemQuantity(InventoryItem item)
Определения QuantityConversions.c:72
static int HasItemQuantity(notnull EntityAI item)
Определения QuantityConversions.c:143
static float GetItemQuantityMax(InventoryItem item)
Определения QuantityConversions.c:96
static string GetItemQuantityText(EntityAI item, bool showMax=false)
Определения QuantityConversions.c:3
Object GetObject()
Определения SlotsIcon.c:360
Widget m_OutOfReachWidget
Определения SlotsIcon.c:25
Widget m_ColWidget
Определения SlotsIcon.c:23
ref array< ImageWidget > m_AmmoIcons
Определения SlotsIcon.c:54
bool MouseEnter(Widget w, int x, int y)
Определения SlotsIcon.c:735
void ClearRemainSelected()
Определения SlotsIcon.c:549
override void SetLayoutName()
Определения SlotsIcon.c:340
Widget GetSelectedPanel()
Определения SlotsIcon.c:245
override void Refresh()
Определения SlotsIcon.c:345
void UpdateFlip(bool flipped)
Определения SlotsIcon.c:491
static int m_NormalWidth
Определения SlotsIcon.c:3
Container GetContainer()
Определения SlotsIcon.c:149
Widget GetPanelWidget()
Определения SlotsIcon.c:205
ItemPreviewWidget GetRender()
Определения SlotsIcon.c:230
void SetItemSize()
Определения SlotsIcon.c:479
void OnIconDrag(Widget w)
Определения SlotsIcon.c:806
bool IsFocused()
Определения SlotsIcon.c:315
EntityAI GetEntity()
Определения SlotsIcon.c:365
Widget GetMicromanagedPanel()
Определения SlotsIcon.c:255
Widget GetRadialIconClosed()
Определения SlotsIcon.c:305
void Init(EntityAI obj, bool reservation=false)
Определения SlotsIcon.c:501
Widget m_CursorWidget
Определения SlotsIcon.c:22
Container m_Container
Определения SlotsIcon.c:16
ItemBase m_Item
Определения SlotsIcon.c:14
ImageWidget m_AmmoIcon
Определения SlotsIcon.c:53
void SetSlotID(int slot_ID)
Определения SlotsIcon.c:195
ImageWidget GetAmmoIcon()
Определения SlotsIcon.c:295
Widget GetReservedWidget()
Определения SlotsIcon.c:220
Widget GetQuantityPanel()
Определения SlotsIcon.c:260
string GetSlotDisplayName()
Определения SlotsIcon.c:154
bool MouseLeave(Widget w, Widget s, int x, int y)
Определения SlotsIcon.c:766
static int m_NormalHeight
Определения SlotsIcon.c:4
bool m_HasTemperature
Определения SlotsIcon.c:8
TextWidget m_ItemSizeWidget
Определения SlotsIcon.c:45
bool MouseLeaveGhostSlot(Widget w, Widget s, int x, int y)
Определения SlotsIcon.c:779
bool m_IsDragged
Определения SlotsIcon.c:18
ProgressBarWidget m_QuantityProgress
Определения SlotsIcon.c:38
void CheckIsMagazine()
Определения SlotsIcon.c:694
bool IsOutOfReach()
Определения SlotsIcon.c:729
void SetSlotDesc(string text)
Определения SlotsIcon.c:159
bool m_IsMagazine
Определения SlotsIcon.c:7
Widget m_MicromanagedPanel
Определения SlotsIcon.c:34
void CheckHasTemperature()
Определения SlotsIcon.c:699
Widget m_ReservedWidget
Определения SlotsIcon.c:26
Widget GetQuantityStack()
Определения SlotsIcon.c:280
Widget m_SelectedPanel
Определения SlotsIcon.c:32
TextWidget GetQuantityItem()
Определения SlotsIcon.c:270
Widget m_RadialIcon
Определения SlotsIcon.c:49
bool m_IsWeapon
Определения SlotsIcon.c:6
EntityAI GetSlotParent()
Определения SlotsIcon.c:185
string m_SlotDesc
Определения SlotsIcon.c:42
EntityAI m_SlotParent
Определения SlotsIcon.c:15
Widget GetItemSizePanel()
Определения SlotsIcon.c:285
void SetSlotDisplayName(string text)
Определения SlotsIcon.c:144
Widget GetColorWidget()
Определения SlotsIcon.c:240
Widget GetCursorWidget()
Определения SlotsIcon.c:210
void OnIconDrop(Widget w)
Определения SlotsIcon.c:861
ItemPreviewWidget m_ItemPreview
Определения SlotsIcon.c:28
void SlotsIcon(LayoutHolder parent, Widget root, int index, EntityAI slot_parent)
Определения SlotsIcon.c:56
void CheckHasItemSize()
Определения SlotsIcon.c:719
static int GetNormalWidth()
Определения SlotsIcon.c:875
Widget m_RadialIconPanel
Определения SlotsIcon.c:47
override bool IsVisible()
Определения SlotsIcon.c:129
static int GetNormalHeight()
Определения SlotsIcon.c:880
EntityAI m_Obj
Определения SlotsIcon.c:13
Widget m_QuantityPanel
Определения SlotsIcon.c:36
bool IsReserved()
Определения SlotsIcon.c:200
bool m_HasItemSize
Определения SlotsIcon.c:10
Widget m_RadialIconClosed
Определения SlotsIcon.c:48
ProgressBarWidget GetQuantityProgress()
Определения SlotsIcon.c:275
ImageWidget m_GhostSlot
Определения SlotsIcon.c:29
void SetTemperature()
Определения SlotsIcon.c:355
Widget GetEmptySelectedPanel()
Определения SlotsIcon.c:250
string m_SlotDisplayName
Определения SlotsIcon.c:41
Widget GetRadialIcon()
Определения SlotsIcon.c:310
void RefreshMuzzleIcon()
Определения SlotsIcon.c:375
void SetSlotParent(EntityAI parent)
Определения SlotsIcon.c:134
float m_CurrQuantity
Определения SlotsIcon.c:11
Widget m_QuantityStack
Определения SlotsIcon.c:39
void SetQuantity()
Определения SlotsIcon.c:422
int m_SlotID
Определения SlotsIcon.c:17
void SetContainer(Container container)
Определения SlotsIcon.c:139
Widget m_EmptySelectedPanel
Определения SlotsIcon.c:33
Widget GetColWidget()
Определения SlotsIcon.c:215
int GetSlotID()
Определения SlotsIcon.c:190
bool m_HasQuantity
Определения SlotsIcon.c:9
Widget m_MountedWidget
Определения SlotsIcon.c:24
TextWidget m_QuantityItem
Определения SlotsIcon.c:37
void Clear()
Определения SlotsIcon.c:612
void CheckIsWeapon()
Определения SlotsIcon.c:623
override void UpdateInterval()
Определения SlotsIcon.c:791
Widget GetMountedWidget()
Определения SlotsIcon.c:225
override void SetActive(bool active)
Определения SlotsIcon.c:320
Widget m_PanelWidget
Определения SlotsIcon.c:20
Widget GetOutOfReachWidget()
Определения SlotsIcon.c:265
ItemBase GetItem()
Определения SlotsIcon.c:370
void SetItemPreview()
Определения SlotsIcon.c:471
bool MouseEnterGhostSlot(Widget w, int x, int y)
Определения SlotsIcon.c:748
void ~SlotsIcon()
Определения SlotsIcon.c:169
string GetSlotDesc()
Определения SlotsIcon.c:164
Widget GetRadialIconPanel()
Определения SlotsIcon.c:300
Widget m_ColorWidget
Определения SlotsIcon.c:31
TextWidget GetItemSizeWidget()
Определения SlotsIcon.c:290
Widget m_ItemSizePanel
Определения SlotsIcon.c:44
void CheckHasQuantity()
Определения SlotsIcon.c:707
bool m_Reserved
Определения SlotsIcon.c:51
ImageWidget GetGhostSlot()
Определения SlotsIcon.c:235
Определения EnWidgets.c:220
override bool IsShowingChamberedBullet()
Определения Magnum.c:285
shorthand
Определения BoltActionRifle_Base.c:6
void RegisterOnMouseLeave(Widget w, Managed eventHandler, string functionName)
Определения WidgetEventHandler.c:126
void RegisterOnDrag(Widget w, Managed eventHandler, string functionName)
Определения WidgetEventHandler.c:98
void RegisterOnDrop(Widget w, Managed eventHandler, string functionName)
Определения WidgetEventHandler.c:105
static WidgetEventHandler GetInstance()
Определения WidgetEventHandler.c:22
void RegisterOnMouseEnter(Widget w, Managed eventHandler, string functionName)
Определения WidgetEventHandler.c:119
Определения EnWidgets.c:190
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
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 float Round(float f)
Returns mathematical round of value.
WidgetFlags
Определения EnWidgets.c:58
proto native Widget CancelWidgetDragging()
proto native Widget GetDragWidget()
int ARGBF(float fa, float fr, float fg, float fb)
Converts <0.0, 1.0> ARGB into color.
Определения proto.c:332