#ifndef HUD_RTS_BUILDINGPANEL_H
#define HUD_RTS_BUILDINGPANEL_H

#include <vgui_controls/Panel.h>
// for buttons
#include "hl2wars/vgui_bitmapbuttonrts.h"
#include "VGui_BitmapImage.h"
#include "hl2wars/rts_shareddefs.h"
#include "vgui/mousecode.h"

class CHudRTSUnitPanel;
class C_BuildingBrush;

//-----------------------------------------------------------------------------
// Purpose: Shows the queue of a building
//-----------------------------------------------------------------------------
class CHudRTSBuildingPanel : public vgui::Panel
{
	DECLARE_CLASS_SIMPLE( CHudRTSBuildingPanel, vgui::Panel);

public:
	CHudRTSBuildingPanel( );
	~CHudRTSBuildingPanel();
	virtual void Init( void );
	void Paint( void );	
	void		 CreateButtonQueue( CBitmapButtonRTS *pSlot, const char *command, int flags);
	void		 SetUnitPanel( CHudRTSUnitPanel *pUnitPanel );

	void CalculatePosSize( void );

	virtual void OnMousePressed( vgui::MouseCode code);
	virtual void OnMouseReleased( vgui::MouseCode code);

protected:
	virtual void OnCommand( const char *command);

private:
	CHudRTSUnitPanel *m_pUnitPanel;

	CBitmapButtonRTS *m_pQueue[QUEUE_MAX];
	CBitmapButtonRTS *m_pCycle[2];
	BitmapImage	m_pImageCyles[2];

	int m_iMaxY;
};

//-----------------------------------------------------------------------------
// Purpose: Shows the construction progress
//-----------------------------------------------------------------------------
class CHudRTSConstructionPanel : public vgui::Panel
{
	DECLARE_CLASS_SIMPLE( CHudRTSConstructionPanel, vgui::Panel);

public:
	CHudRTSConstructionPanel( );
	~CHudRTSConstructionPanel();
	virtual void Init( void );
	virtual void OnThink( void );	

	void CalculatePosSize( void );

	virtual void OnMousePressed( vgui::MouseCode code);
	virtual void OnMouseReleased( vgui::MouseCode code);

protected:
	virtual void	ApplySchemeSettings( vgui::IScheme *scheme );

private:
	vgui::Label *m_pConstruction;
};

#endif  // HUD_RTS_BUILDINGPANEL_H