/* ***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/LGPL 2.1/GPL 2.0

The contents of this file are subject to the Mozilla Public License Version 
1.1 (the "License"); you may not use this file except in compliance with
...
for the specific language governing rights and limitations under the
License.

The Original Code is for Luminous Forts.

The Initial Developer of the Original Code is Hekar Khani.
Portions created by the Hekar Khani are Copyright (C) 2010
Hekar Khani. All Rights Reserved.

Contributor(s):
  Hekar Khani <hekark@gmail.com>

Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
...
the terms of any one of the MPL, the GPL or the LGPL.

***** END LICENSE BLOCK ***** */


#ifndef HUD_BASE_H
#define HUD_BASE_H


#ifdef WIN32
#pragma once
#endif

#include "iclientmode.h"
#include "hud_macros.h"
#include "hudelement.h"

// Added for misc draw functions
#include "sdk_backgroundpanel.h"

#define HUDELEM_NONE			( 0<<0 )
#define HUDELEM_ALL				( 1<<0 )
#define HUDELEM_BLOCKHEALTH		( 2<<0 )
#define HUDELEM_FLAGCARRIER		( 3<<0 )
#define HUDELEM_FLAGCOMPASS		( 4<<0 )
#define HUDELEM_FLAGPOS			( 5<<0 )
#define HUDELEM_PHASETIME		( 6<<0 )
#define HUDELEM_PLAYERMARKER	( 7<<0 )
#define HUDELEM_FREEZEPROGRESS	( 8<<0 )

class CModHudElement : public CHudElement
{
	DECLARE_CLASS( CModHudElement, CHudElement );
public:
	CModHudElement( const char *pElementName, int HudElementMask = HUDELEM_ALL );
	~CModHudElement();

	virtual bool ShouldDraw();

	virtual int GetElementMask() const;
	virtual void SetElementMask( int flag = HUDELEM_ALL );

	virtual void LevelStart();
	virtual void LevelEnd();

	int GetHiddenBits() { return m_iHiddenBits; }

	virtual const int GetGameModes() const
	{
		return m_iGamemodes;
	}

	virtual void SetGameModes( int iGamemodes );

private:
	PrivateMethod void LevelInit();
	PrivateMethod void LevelShutdown();

private:
	int m_iElementMask;
	bool m_bLevelStarted;
	int m_iGamemodes;
};

class CModHudManager
{
public:
	CModHudManager();
	~CModHudManager();

	int GetEnabledHudElementMask();
	void SetEnabledHudElementMask( int enabledmask );

private:
	int m_iEnabledMask;
};

extern CModHudManager g_ModHudManager;

#endif // HUD_BASE_H