DayZ 1.24
Loading...
Searching...
No Matches
RadialQuickbarMenu.c
Go to the documentation of this file.
6
8{
9 protected bool m_IsLightSourceExtra;
10 protected bool m_IsNVG;
11 protected int m_Id;
12 protected int m_Category;
13 protected int m_CategorySwitchID;
14 protected EntityAI m_Item;
15 protected string m_ItemName;
16
17 //radial menu
20
22 {
23 m_Id = id;
24 m_Item = item;
28
29 //
30 if (ItemBase.Cast(m_Item))
31 {
32 m_IsNVG = ItemBase.Cast(m_Item).IsNVG();
33 m_IsLightSourceExtra = ItemBase.Cast(m_Item).IsLightSource();
34 }
35 }
36
38 {
39 return m_Item;
40 }
41
43 {
44 m_Item = item;
45 }
46
48 {
50 }
51
53 {
54 return m_IsNVG;
55 }
56
57 int GetId()
58 {
59 return m_Id;
60 }
61
63 {
64 return m_Category;
65 }
66
68 {
69 return m_CategorySwitchID;
70 }
71
76
81
82 string GetItemName()
83 {
84 return m_ItemName;
85 }
86}
87
88class RadialQuickbarMenu extends UIScriptedMenu
89{
92 protected Widget m_ToolbarPanel;
93
94 protected bool m_IsMenuClosing;
95 protected int m_CurrentCategory;
96 //
97 const string TEXT_ITEM_NAME = "ItemName";
98 const string TEXT_ITEM_TITLE = "ItemTitle";
99 //selections
100 protected Widget m_SelectedItem;
102
103 //instance
104 static RadialQuickbarMenu instance;
105
106 //============================================
107 // RadialQuickbarMenu
108 //============================================
110 {
112 m_CurrentCategory = RadialQuickbarCategory.DEFAULT;
113
114 if (!instance)
115 instance = this;
116
117 GetGame().GetMission().GetOnInputPresetChanged().Insert(OnInputPresetChanged);
118 }
119
121 {
122 if (GetGame() && GetGame().GetMission())
123 {
124 GetGame().GetMission().RemoveActiveInputExcludes({"radialmenu"}, false);
125 }
126 }
127
129 {
130 m_ItemToAssign = item;
131 }
132
134 {
135 return m_ItemToAssign;
136 }
137
138 static RadialQuickbarMenu GetMenuInstance()
139 {
140 return instance;
141 }
142
143 protected void OnInputPresetChanged()
144 {
145#ifdef PLATFORM_CONSOLE
147#endif
148 }
149
150 //============================================
151 // Menu Controls
152 //============================================
153 static void OpenMenu(UIScriptedMenu parent = NULL)
154 {
155 GetGame().GetUIManager().EnterScriptedMenu(MENU_RADIAL_QUICKBAR, parent);
156 }
157
158 static void CloseMenu()
159 {
160 GetGame().GetUIManager().Back();
161 //GetGame().GetMission().RemoveActiveInputExcludes({"radialmenu"},false);
162 }
163
164 //============================================
165 // Init & Widget Events
166 //============================================
167 override Widget Init()
168 {
169 layoutRoot = GetGame().GetWorkspace().CreateWidgets("gui/layouts/radial_menu/radial_quickbar/radial_quickbar_menu.layout");
170 m_ItemCardPanel = layoutRoot.FindAnyWidget(RadialMenu.RADIAL_ITEM_CARD_CONTAINER);
171
172 //register gestures menu
173 RadialMenu.GetInstance().RegisterClass(this);
174
175 //delay updates until fully initialized
176 RadialMenu.GetInstance().SetWidgetInitialized(false);
177
178 //set radial menu properties
179 RadialMenu.GetInstance().SetWidgetProperties("gui/layouts/radial_menu/radial_quickbar/radial_quickbar_delimiter.layout");
180
181 //create content (widgets) for items
183
184 //set controller toolbar icons
186
187 m_ToolbarPanel = layoutRoot.FindAnyWidget("toolbar_bg");
188 m_ToolbarPanel.Show(true);
189
190 return layoutRoot;
191 }
192
193 override void OnShow()
194 {
195 super.OnShow();
196
197 Mission mission = GetGame().GetMission();
198 if (mission)
199 {
200 IngameHud hud = IngameHud.Cast(mission.GetHud());
201 if (hud)
202 hud.ShowQuickbarUI(false);
203 }
204
205 SetFocus(layoutRoot);
206 m_IsMenuClosing = false;
207 }
208
209 override void OnHide()
210 {
211 super.OnHide();
212
213 Mission mission = GetGame().GetMission();
214 if (mission)
215 {
216 IngameHud hud = IngameHud.Cast(mission.GetHud());
217 if (hud)
218 hud.ShowQuickbarUI(true);
219 }
220
221 //reset item to assign
222 RadialQuickbarMenu.SetItemToAssign(NULL);
223 m_IsMenuClosing = true;
224 }
225
226 override bool OnController(Widget w, int control, int value)
227 {
228 super.OnController(w, control, value);
229
230 RadialMenu.GetInstance().SetControlType(RadialMenuControlType.CONTROLLER);
231
232 return false;
233 }
234
235 override bool OnMouseEnter(Widget w, int x, int y)
236 {
237 super.OnMouseEnter(w, x, y);
238
239 RadialMenu.GetInstance().SetControlType(RadialMenuControlType.MOUSE);
240
241 return false;
242 }
243
244 override bool UseMouse()
245 {
246 return true;
247 }
248
249 override bool UseGamepad()
250 {
251 return true;
252 }
253
254 //============================================
255 // Content
256 //============================================
257 //reset_selection - if false, selected quick bar item will be remembered after content refresh
258 protected void RefreshQuickbar(bool reset_selection = true)
259 {
260 int selected_item_id = -1;
261 if (!reset_selection)
262 {
264 if (instance.m_SelectedItem)
265 {
266 instance.m_SelectedItem.GetUserData(quickbar_item);
268 }
269 }
270
271 GetItems(m_Items);
272 //CheckForLightsAndNVG( m_Items );
273 CreateContent(selected_item_id);
274 }
275
276 //
277 // ITEMS
278 //
280 {
281 items.Clear();
282
284 int size = player.GetQuickBarSize();
286
287 for (int i = 0; i < size; ++i)
288 {
289 entity = player.GetQuickBarEntity(i);
290
291 items.Insert(new RadialQuickbarItem(i, entity, ""));
292 }
293
294 CheckForLightsAndNVG(m_Items, i);
295 }
296
298 {
300 int count = 0;
302 ItemBase headgear = ItemBase.Cast(player.FindAttachmentBySlotName("Headgear"));
303 ItemBase eyewear = ItemBase.Cast(player.FindAttachmentBySlotName("Eyewear"));
304
305 //nvg - headgear check
306 if (headgear)
307 {
308 entity = headgear.FindAttachmentBySlotName("NVG");
309 if (entity)
310 {
311 items.Insert(new RadialQuickbarItem(count, entity, "", RadialQuickbarCategory.SPECIALIZED_LIGHTS));
312 count++;
313 }
314 }
315 //nvg/light - eyewear check
316 if (eyewear)
317 {
318 entity = eyewear.FindAttachmentBySlotName("NVG");
319 if (entity)
320 {
321 items.Insert(new RadialQuickbarItem(count, entity, "", RadialQuickbarCategory.SPECIALIZED_LIGHTS));
322 count++;
323 }
324 else if (eyewear.IsLightSource() && eyewear.HasEnergyManager() && eyewear.GetCompEM().CanWork())
325 {
326 entity = eyewear;
327 items.Insert(new RadialQuickbarItem(count, entity, "", RadialQuickbarCategory.SPECIALIZED_LIGHTS));
328 count++;
329 }
330 }
331 //light
332 if (headgear)
333 {
334 if (headgear.GetInventory().AttachmentCount() > 0)
335 {
337 for (int i = 0; i < headgear.GetInventory().AttachmentCount(); i++)
338 {
339 attachment = ItemBase.Cast(headgear.GetInventory().GetAttachmentFromIndex(i));
340 if (attachment && attachment.IsLightSource() && attachment.HasEnergyManager() && attachment.GetCompEM().CanWork())
341 {
343 items.Insert(new RadialQuickbarItem(count, entity, "", RadialQuickbarCategory.SPECIALIZED_LIGHTS));
344 count++;
345 }
346 }
347 }
348 }
349
350 //Add a category switchers
351 if (m_CurrentCategory == RadialQuickbarCategory.DEFAULT && count > 0)
352 items.InsertAt(new RadialQuickbarItem(32, null, "#toggle_lights", RadialQuickbarCategory.DEFAULT, RadialQuickbarCategory.SPECIALIZED_LIGHTS), 0);
353 else if (m_CurrentCategory == RadialQuickbarCategory.SPECIALIZED_LIGHTS)
354 items.InsertAt(new RadialQuickbarItem(32, null, "#menu_back", RadialQuickbarCategory.SPECIALIZED_LIGHTS, RadialQuickbarCategory.DEFAULT), 0);
355 }
356
357 protected void CreateContent(int selected_item_id = -1)
358 {
359 //delete existing content
360 DeleteItems();
361
363
364 for (int i = 0; i < m_Items.Count(); ++i)
365 {
366 RadialQuickbarItem quickbar_item = m_Items.Get(i);
367
368 if (quickbar_item.GetItemCategory() == m_CurrentCategory)
369 {
370 //create item card
371 Widget item_card_widget = Widget.Cast(GetGame().GetWorkspace().CreateWidgets("gui/layouts/radial_menu/radial_quickbar/radial_quickbar_item_card.layout", m_ItemCardPanel));
372 quickbar_item.SetRadialItemCard(item_card_widget);
373
374 //update item card widget
375 UpdateQuickbarItemCard(quickbar_item);
376
377 //set data
378 item_card_widget.SetUserData(quickbar_item);
379
380 //set selection
381 if (quickbar_item.GetId() == selected_item_id)
382 MarkSelected(quickbar_item.GetRadialItemCard());
384 }
385 }
386
387 //adjust radial parameters for content
388 if (/*m_Items.Count()*/category_item_count > 0)
389 {
390 RadialMenu radial_menu = RadialMenu.GetInstance();
391 radial_menu.SetRadiusOffset(0);
392 radial_menu.SetExecuteDistOffset(0.5);
393 radial_menu.SetOffsetFromTop(0);
394 radial_menu.SetItemCardRadiusOffset(0.25);
395 radial_menu.ActivateControllerTimeout(false);
396 }
397
398 //refresh radial menu
399 RadialMenu.GetInstance().Refresh(false);
400 }
401
403 {
404 Widget item_card_widget = quickbar_item.GetRadialItemCard();
405
406 //get content panels
407 Widget item_details = item_card_widget.FindAnyWidget("ItemDetails");
408 TextWidget item_title = TextWidget.Cast(item_card_widget.FindAnyWidget("ItemTitle"));
409
410 //set text
411 TextWidget text_widget = TextWidget.Cast(item_card_widget.FindAnyWidget(TEXT_ITEM_NAME));
412 EntityAI item = quickbar_item.GetItem();
413
414 Widget quantity_panel = item_card_widget.FindAnyWidget("QuantityPanel");
415 if (item)
416 {
417 //item text
418 text_widget.SetText(quickbar_item.GetItem().GetDisplayName());
419
420 //item preview
421 ItemPreviewWidget item_preview = ItemPreviewWidget.Cast(item_card_widget.FindAnyWidget("ItemPreview"));
422 item_preview.SetItem(item);
423 item_preview.SetView(item.GetViewIndex());
424 item_preview.SetModelOrientation(Vector(0, 0, 0));
425
426 //item quantity
427 Widget quantity_stack = quantity_panel.FindAnyWidget("QuantityStackPanel");
428 ProgressBarWidget quantity_bar = ProgressBarWidget.Cast(quantity_panel.FindAnyWidget("QuantityBar"));
430 //calculate and set quantity
432 quantity_panel.Show(false);
433 else if (has_quantity == QUANTITY_COUNT)
434 {
435 //hide bar
436 quantity_bar.Show(false);
437
438 //show stack
439 TextWidget quantity_text = TextWidget.Cast(quantity_stack.FindAnyWidget("Quantity"));
441 quantity_stack.Show(true);
442 }
444 {
445 //hide stack
446 quantity_stack.Show(false);
447
448 //show bar
449 float progress_max = quantity_bar.GetMax();
450 int max = item.ConfigGetInt("varQuantityMax");
451 int count = item.ConfigGetInt("count");
453
454 if (count > 0)
455 max = count;
456 if (max > 0)
457 {
458
459 float value = Math.Round((quantity / max) * 100);
460 quantity_bar.SetCurrent(value);
461 }
462
463 quantity_bar.Show(true);
464 }
465
466 //display content panels
467 item_details.Show(true);
468 item_title.Show(false);
469 }
470 else if (quickbar_item.GetCategorySwitchID() != -1)
471 {
472 item_title.SetText(quickbar_item.GetItemName());
473
474 item_details.Show(false);
475 item_title.Show(true);
476 }
477 else
478 {
479 item_title.SetText("#container_empty");
480
481 //display content panels
482 item_details.Show(false);
483 item_title.Show(true);
484 }
485 }
486
487 //Common
488 protected void DeleteItems()
489 {
492
493 child = m_ItemCardPanel.GetChildren();
494 while (child)
495 {
497 child = child.GetSibling();
498
499 delete child_to_destroy;
500 }
501 }
502
503 protected void ChangeCurrentCategory(int category)
504 {
505 m_CurrentCategory = category;
506 RefreshQuickbar(false);
508 }
509
510 //============================================
511 // Radial Menu Events
512 //============================================
513 //Common
517
518 //Mouse
520 {
521 MarkSelected(w);
522 }
523
525 {
526 UnmarkSelected(w);
527 }
528
530 {
531 }
532
535 {
536 PrimaryAction(w);
537 }
538
541 {
542 BackOneLevel();
543 }
544
545 //Controller
547 {
548 MarkSelected(w);
549 }
550
552 {
553 UnmarkSelected(w);
554 }
555
557 {
558 PrimaryAction(w);
559 }
560
562 {
563 //SecondaryAction( w );
564 BackOneLevel();
565 }
566
567 //Actions
568 protected void MarkSelected(Widget w)
569 {
570 m_SelectedItem = w;
571
572 if (w)
573 {
575 w.GetUserData(quickbar_item);
577
578 if (quickbar_item && Class.CastTo(item, quickbar_item.GetItem()))
579 w.SetFlags(WidgetFlags.DISABLED);
580 else
581 w.ClearFlags(WidgetFlags.DISABLED);
582 /*
583 //is not category
584 if ( quickbar_item )
585 {
586 if ( quickbar_item.GetItem() )
587 {
588 //alter item visual
589 TextWidget text_widget = TextWidget.Cast( quickbar_item.GetRadialItemCard().FindAnyWidget( TEXT_ITEM_NAME ) );
590 text_widget.SetColor( ARGB( 255, 66, 175, 95 ) );
591 }
592 else
593 {
594 //alter item visual
595 TextWidget title_widget = TextWidget.Cast( quickbar_item.GetRadialItemCard().FindAnyWidget( TEXT_ITEM_TITLE ) );
596 title_widget.SetColor( ARGB( 255, 66, 175, 95 ) );
597 }
598 }
599 */
600 }
601 }
602
603 protected void UnmarkSelected(Widget w)
604 {
605 m_SelectedItem = NULL;
606
607 /*
608 if ( w )
609 {
610 RadialQuickbarItem quickbar_item;
611 w.GetUserData( quickbar_item );
612
613 //is not category
614 if ( quickbar_item )
615 {
616 if ( quickbar_item.GetItem() )
617 {
618 //alter item visual
619 TextWidget text_widget = TextWidget.Cast( quickbar_item.GetRadialItemCard().FindAnyWidget( TEXT_ITEM_NAME ) );
620 text_widget.SetColor( ARGB( 255, 255, 255, 255 ) );
621 }
622 else
623 {
624 //alter item visual
625 TextWidget title_widget = TextWidget.Cast( quickbar_item.GetRadialItemCard().FindAnyWidget( TEXT_ITEM_TITLE ) );
626 title_widget.SetColor( ARGB( 255, 255, 255, 255 ) );
627 }
628 }
629 }
630 */
631 }
632
633 protected void PrimaryAction(Widget w)
634 {
635 if (instance.m_SelectedItem)
636 {
637 if (!GetGame().IsDedicatedServer())
638 {
640 instance.m_SelectedItem.GetUserData(quickbar_item);
641
642 if (quickbar_item)
643 {
645
646 //ASSIGN ACTION
647 if (GetItemToAssign())
648 {
649 //assign item to slot
650 if (quickbar_item.GetItem() == GetItemToAssign())
651 player.RemoveQuickBarEntityShortcut(GetItemToAssign());
652 else
653 player.SetQuickBarEntityShortcut(GetItemToAssign(), quickbar_item.GetId());
654 }
655 //LIGHTS
656 else if (m_CurrentCategory == RadialQuickbarCategory.SPECIALIZED_LIGHTS && quickbar_item.IsLightSourceExtra())
657 HandleLights(quickbar_item);
658 //NVG
659 else if (m_CurrentCategory == RadialQuickbarCategory.SPECIALIZED_LIGHTS && quickbar_item.IsNVGExtra())
660 HandleNVG(quickbar_item);
661 //change quickbar category
662 else if (quickbar_item.GetCategorySwitchID() != -1)
663 {
664 ChangeCurrentCategory(quickbar_item.GetCategorySwitchID());
665 return;
666 }
667 //SWAP
668 else
669 {
670 EntityAI item = quickbar_item.GetItem();
671
672 if (item)
673 {
674 //swap
675 player.RadialQuickBarSingleUse(quickbar_item.GetId() + 1); //id must begin with 1 (simulating key press 1-9)
676 }
677 }
678
679 RefreshQuickbar(false);
680 }
681 }
682 }
683 }
684
685 protected void SecondaryAction(Widget w)
686 {
687 if (instance.m_SelectedItem && m_CurrentCategory == RadialQuickbarCategory.DEFAULT)
688 {
689 if (!GetGame().IsDedicatedServer())
690 {
692 instance.m_SelectedItem.GetUserData(quickbar_item);
693
694 if (quickbar_item)
695 {
697 EntityAI item = quickbar_item.GetItem();
698
699 if (item)
700 {
701 player.RadialQuickBarCombine(quickbar_item.GetId() + 1); //id must begin with 1 (simulating key press 1-9)
702 RefreshQuickbar(false);
703 }
704 }
705 }
706 }
707 }
708
709 // returns to default, missing hierarchy to properly traverse ATM
710 protected void BackOneLevel()
711 {
712 if (m_CurrentCategory != RadialQuickbarCategory.DEFAULT)
713 ChangeCurrentCategory(RadialQuickbarCategory.DEFAULT);
714 }
715
716 //-------------------------------------------
717 //NVG/Light handling extension
718 //-------------------------------------------
720 {
722 ItemBase item = ItemBase.Cast(quickbar_item.GetItem());
724 ActionTarget atrg;
725
726 if (Headtorch_ColorBase.Cast(item))
727 {
728 atrg = new ActionTarget(item, null, -1, vector.Zero, -1.0);
729 if (mngr_client.GetAction(ActionTurnOnHeadtorch).Can(player, atrg, null))
730 mngr_client.PerformActionStart(player.GetActionManager().GetAction(ActionTurnOnHeadtorch), atrg, null);
731 else if (mngr_client.GetAction(ActionTurnOffHeadtorch).Can(player, atrg, null))
732 mngr_client.PerformActionStart(player.GetActionManager().GetAction(ActionTurnOffHeadtorch), atrg, null);
733 }
734 else if (Mich2001Helmet.Cast(item.GetHierarchyParent()))
735 {
736 atrg = new ActionTarget(item.GetHierarchyParent(), null, -1, vector.Zero, -1.0);
738 mngr_client.PerformActionStart(player.GetActionManager().GetAction(ActionTurnOnHelmetFlashlight), atrg, null);
739 else if (mngr_client.GetAction(ActionTurnOffHelmetFlashlight).Can(player, atrg, null))
740 mngr_client.PerformActionStart(player.GetActionManager().GetAction(ActionTurnOffHelmetFlashlight), atrg, null);
741 }
742 }
743
745 {
748 ActionTarget atrg;
749
750 atrg = new ActionTarget(quickbar_item.GetItem().GetHierarchyParent(), null, -1, vector.Zero, -1.0);
751 if (mngr_client.GetAction(ActionToggleNVG).Can(player, atrg, null))
752 mngr_client.PerformActionStart(player.GetActionManager().GetAction(ActionToggleNVG), atrg, null);
753 }
754
756 {
757 return m_IsMenuClosing;
758 }
759
761 {
762 m_IsMenuClosing = state;
763 }
764
765 protected void UpdateControlsElements()
766 {
767 Widget toolbarBackSpacer = layoutRoot.FindAnyWidget("BackSpacer");
768
769 RichTextWidget toolbarSelectIcon = RichTextWidget.Cast(layoutRoot.FindAnyWidget("SelectIcon"));
770 RichTextWidget toolbarBackIcon = RichTextWidget.Cast(layoutRoot.FindAnyWidget("BackIcon"));
771
772 string selectAction;
773 string backAction;
774 int controllerID;
775
776 if (GetGame().GetInput().IsEnabledMouseAndKeyboardEvenOnServer() && GetGame().GetInput().GetCurrentInputDevice() == EInputDeviceType.MOUSE_AND_KEYBOARD)
777 {
778 selectAction = "UAMenuSelect";
779 backAction = "UAMenuBack";
781 }
782 else
783 {
784 selectAction = "UAUISelect";
785 backAction = "UAUIBack";
787 }
788
791 toolbarBackSpacer.Show(m_CurrentCategory != RadialQuickbarCategory.DEFAULT);
792 }
793}
void OnInputPresetChanged()
Definition Inventory.c:160
ActionInput GetInput()
Definition ActionBase.c:989
DetachActionData m_ItemName
ItemBase m_Item
Definition ActionInput.c:16
class ActionTargets ActionTarget
class GetServerModListResult m_Id
GetServersResultRow the output structure of the GetServers operation that represents one game server.
Mission mission
Widget m_RadialMenuSelector
void SetRadialItemCard(Widget widget)
Widget m_RadialMenuItemCard
Widget GetRadialItemCard()
Icon x
Icon y
void RefreshQuickbar()
void UpdateControlsElements()
PlayerBase GetPlayer()
RadialMenuControlType
Definition RadialMenu.c:2
void RadialMenu()
Definition RadialMenu.c:84
RadialQuickbarCategory
@ DEFAULT
@ SPECIALIZED_LIGHTS
bool IsNVGExtra()
string GetItemName()
bool IsLightSourceExtra()
enum RadialQuickbarCategory m_IsLightSourceExtra
void RadialQuickbarItem(int id, EntityAI item, string item_name, int category=RadialQuickbarCategory.DEFAULT, int category_switch=-1)
void SetItem(EntityAI item)
int GetItemCategory()
int m_CategorySwitchID
EntityAI GetItem()
int GetCategorySwitchID()
int GetId()
bool m_IsNVG
Super root of all classes in Enforce script.
Definition EnScript.c:11
static string GetRichtextButtonIconFromInputAction(notnull UAInput pInput, string pLocalizedDescription, int pInputDeviceType=EUAINPUT_DEVICE_CONTROLLER, float pScale=ICON_SCALE_NORMAL, bool pVertical=false)
Definition InputUtils.c:151
static const float ICON_SCALE_TOOLBAR
Definition InputUtils.c:15
Definition EnMath.c:7
Mission class.
Definition gameplay.c:668
Hud GetHud()
Definition gameplay.c:701
static float GetItemQuantity(InventoryItem item)
static int HasItemQuantity(notnull EntityAI item)
static string GetItemQuantityText(EntityAI item, bool showMax=false)
void CreateContent(int selected_item_id=-1)
override bool OnMouseEnter(Widget w, int x, int y)
override void OnShow()
static EntityAI m_ItemToAssign
void UpdateQuickbarItemCard(RadialQuickbarItem quickbar_item)
static void CloseMenu()
void CheckForLightsAndNVG(out ref array< ref RadialQuickbarItem > items, int last_idx)
override bool UseMouse()
void MarkSelected(Widget w)
static void SetItemToAssign(EntityAI item)
void OnControllerPressSelect(Widget w)
ref array< ref RadialQuickbarItem > m_Items
void RefreshQuickbar(bool reset_selection=true)
override void OnHide()
void OnControlsChanged(RadialMenuControlType type)
void OnMousePressRight(Widget w)
RMB.
void OnMouseExecute(Widget w)
void OnControllerDeselect(Widget w)
override bool UseGamepad()
void UnmarkSelected(Widget w)
void OnControllerSelect(Widget w)
static RadialQuickbarMenu GetMenuInstance()
void HandleLights(RadialQuickbarItem quickbar_item)
void PrimaryAction(Widget w)
void HandleNVG(RadialQuickbarItem quickbar_item)
void OnMouseDeselect(Widget w)
Widget m_SelectedItem
void OnControllerPressBack(Widget w)
override Widget Init()
override bool OnController(Widget w, int control, int value)
void SetMenuClosing(bool state)
void OnMousePressLeft(Widget w)
LMB.
void OnMouseSelect(Widget w)
static void OpenMenu(UIScriptedMenu parent=NULL)
void GetItems(out ref array< ref RadialQuickbarItem > items)
Widget m_ToolbarPanel
static EntityAI GetItemToAssign()
static RadialQuickbarMenu instance
void ChangeCurrentCategory(int category)
void SecondaryAction(Widget w)
static const vector Zero
Definition EnConvert.c:110
proto native CGame GetGame()
const int QUANTITY_PROGRESS
Definition constants.c:484
const int QUANTITY_COUNT
Definition constants.c:483
const int QUANTITY_HIDDEN
Definition constants.c:482
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
string m_Category
folder structure eg. StaticEntities/Walls
Definition EnEntity.c:841
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto float Round(float f)
Returns mathematical round of value.
const int MENU_RADIAL_QUICKBAR
Definition constants.c:188
WidgetFlags
Definition EnWidgets.c:58
proto native void SetFocus(Widget w)
EInputDeviceType
Definition input.c:3