4 protected bool m_Hidden;
8 m_MainWidget.Show(
true );
11 m_MainWidget.SetSort( sort + 2 );
13 m_MainWidget = m_MainWidget.FindAnyWidget(
"header" );
16 m_CollapsibleHeader =
new CollapsibleHeader(
this,
"CollapseButtonOnMouseButtonDown" );
19 override void SetLayoutName()
29 override void OnDropReceivedFromHeader(
Widget w,
int x,
int y,
Widget receiver ) { }
31 override void Refresh()
36 override void OnShow()
40 for (
int i = 0; i < m_Body.Count(); i++)
42 m_Body.Get( i ).OnShow();
49 SetCollapsibleHeaderArrowState(m_Hidden);
52 override void OnHide()
55 if (m_CollapsibleHeader)
57 SetCollapsibleHeaderArrowState(m_Hidden);
66 override void Insert(
LayoutHolder container,
int pos = -1,
bool immedUpdate =
true )
68 super.Insert( container, pos, immedUpdate );
72 RecomputeOpenedContainers();
73 UpdateCollapseButtons();
76 SetCollapsibleHeaderArrowState(m_Hidden);
81 super.Remove( container );
82 RecomputeOpenedContainers();
83 UpdateCollapseButtons();
86 bool CanDisplayAnyCategory()
91 void UpdateCollapseButtons()
93 #ifndef PLATFORM_CONSOLE
94 if (m_Body.Count() < 2)
96 if (m_CollapsibleHeader)
98 m_CollapsibleHeader.ShowCollapseButton(
false);
103 if (m_CollapsibleHeader)
105 m_CollapsibleHeader.ShowCollapseButton(
true);
111 void LoadDefaultState()
113 m_Hidden = !
ItemManager.GetInstance().GetDefaultHeaderOpenState(
"VICINITY" );
131 void CollapseButtonOnMouseButtonDown(
Widget w )
136 override void Toggle()
140 for (
int i = 1; i < m_Body.Count(); i++)
142 m_Body.Get( i ).OnHide();
157 SetCollapsibleHeaderArrowState(m_Hidden);
159 UpdateCollapseButtons();
164 if( w == GetMainWidget() )
165 GetMainWidget().Update();
171 if( w == GetMainWidget() )
172 GetMainWidget().Update();
176 override Header GetHeader()
178 return m_CollapsibleHeader;
181 override void SetHeader(
Header header)
186 void SetCollapsibleHeaderArrowState(
bool open)
188 if (m_CollapsibleHeader)
190 m_CollapsibleHeader.SetArrowButtonOpened(open);