Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_EditableEntityLinkUIComponent.c
Go to the documentation of this file.
1 
4 {
5  protected SCR_EditableEntityComponent m_LinkedEntity;
6  protected SCR_HoverEditableEntityFilter m_HoverManager;
7 
8  //------------------------------------------------------------------------------------------------
11  void SetLinkedEntity(SCR_EditableEntityComponent entity)
12  {
13  m_LinkedEntity = entity;
14  }
15 
16  //------------------------------------------------------------------------------------------------
19  SCR_EditableEntityComponent GetLinkedEntity()
20  {
21  return m_LinkedEntity;
22  }
23 
24  //------------------------------------------------------------------------------------------------
25  protected void OnMenuUpdate()
26  {
27  if (!m_HoverManager || !m_LinkedEntity)
28  return;
29 
30  m_HoverManager.SetEntityUnderCursor(m_LinkedEntity, true);
31  }
32 
33  //------------------------------------------------------------------------------------------------
34  override bool OnMouseEnter(Widget w, int x, int y)
35  {
36  if (!m_LinkedEntity)
37  return false;
38 
39  MenuRootBase menu = GetMenu();
40  if (!menu)
41  return false;
42 
43  menu.GetOnMenuUpdate().Insert(OnMenuUpdate);
44  return false;
45  }
46 
47  //------------------------------------------------------------------------------------------------
48  override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
49  {
50  MenuRootBase menu = GetMenu();
51  if (!menu)
52  return false;
53 
54  menu.GetOnMenuUpdate().Remove(OnMenuUpdate);
55  return false;
56  }
57 
58  //------------------------------------------------------------------------------------------------
59  override bool IsUnique()
60  {
61  return false;
62  }
63 
64  //------------------------------------------------------------------------------------------------
65  override void HandlerAttachedScripted(Widget w)
66  {
68  }
69 }
EEditableEntityState
EEditableEntityState
Definition: EEditableEntityState.c:37
MenuRootSubComponent
Definition: MenuRootSubComponent.c:5
GetMenu
SCR_RadialMenu GetMenu()
Definition: SCR_RadialMenuGameModeComponent.c:41
m_HoverManager
SCR_BaseActionsEditorComponentClass m_HoverManager
MenuRootBase
Definition: MenuRootBase.c:6
SCR_HoverEditableEntityFilter
Definition: SCR_HoverEditableEntityFilter.c:6
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13