3 protected int m_DefaultColor;
4 protected int m_DefaultFontSize;
8 protected Widget m_CollapseButton;
9 protected Widget m_UpArrowButton;
10 protected Widget m_DownArrowButton;
15 m_CollapseButton = GetMainWidget().FindAnyWidget(
"collapse_button" );
16 m_UpArrowButton = GetMainWidget().FindAnyWidget(
"opened" );
17 m_DownArrowButton = GetMainWidget().FindAnyWidget(
"closed" );
19 #ifdef PLATFORM_CONSOLE
20 m_CollapseButton.Show(
false );
26 WidgetEventHandler.GetInstance().RegisterOnDraggingOver( GetMainWidget(),
this,
"DraggingOverHeader" );
30 m_DefaultColor = GetRootWidget().GetColor();
33 void SetName(
string name )
36 m_HeaderText.SetText(
name );
39 void SetItemPreview(
EntityAI entity_ai )
41 #ifndef PLATFORM_CONSOLE
44 item_preview.SetItem(entity_ai);
45 item_preview.SetView( entity_ai.GetViewIndex() );
55 parent_container.DraggingOverHeader( w,
x,
y, receiver );
58 void OnDropReceivedFromHeader(
Widget w,
int x,
int y,
Widget receiver )
61 parent_container.OnDropReceivedFromHeader( w,
x,
y, receiver );
64 override void SetActive(
bool active )
66 super.SetActive( active );
69 GetMainWidget().SetColor(
ARGBF( 1, 1, 0, 0 ) );
71 GetMainWidget().SetColor( m_DefaultColor );
74 void ShowCollapseButton(
bool state)
76 m_CollapseButton.Show(state);