Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ShowHideInEditorUIComponent.c
Go to the documentation of this file.
2{
3 protected Widget m_Root;
4
5 [Attribute("1")]
6 protected bool m_bShowInEditor;
7
8 //------------------------------------------------------------------------------------------------
9 protected void OnEditorOpen()
10 {
11 m_Root.SetVisible(m_bShowInEditor);
12 }
13
14 //------------------------------------------------------------------------------------------------
15 protected void OnEditorClosed()
16 {
17 m_Root.SetVisible(!m_bShowInEditor);
18 }
19
20 //------------------------------------------------------------------------------------------------
21 override void HandlerAttached(Widget w)
22 {
23 m_Root = w;
24 SCR_EditorManagerEntity editorManagerEntity = SCR_EditorManagerEntity.GetInstance();
25
26 if (!editorManagerEntity)
27 return;
28
29 editorManagerEntity.GetOnOpened().Insert(OnEditorOpen);
30 editorManagerEntity.GetOnClosed().Insert(OnEditorClosed);
31
32 m_Root.SetVisible(m_bShowInEditor == editorManagerEntity.IsOpened());
33 }
34
35 //------------------------------------------------------------------------------------------------
36 override void HandlerDeattached(Widget w)
37 {
38 SCR_EditorManagerEntity editorManagerEntity = SCR_EditorManagerEntity.GetInstance();
39
40 if (!editorManagerEntity)
41 return;
42
43 editorManagerEntity.GetOnOpened().Remove(OnEditorOpen);
44 editorManagerEntity.GetOnClosed().Remove(OnEditorClosed);
45 }
46}
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
SCR_FieldOfViewSettings Attribute