// This file is part of ThriceBall.
//
// Author: Kai Hillenbrand (AnTeevY)
// © Copyright, 2009 by Kai Hillenbrand, http://www.anteevy.de

// --------------------------------------------------

#pragma once
#ifndef INTERFACE_H
#define INTERFACE_H

// extern includes
#include <OIS/OIS.h>
#include <OgreCEGUIRenderer.h>
#include <CEGUI/CEGUI.h>
#include <iostream.>

// intern includes
#include "renderer.h"

class CRenderer;

// --------------------------------------------------

class CInterface
{
public:
	CInterface(CRenderer *renderer);

	void setupHUD();			// setup interface (boxes)
	void updateHUD();			// update interface

	void drawInfo(String text, bool forceText = false);	// show the info text
	void hideInfo();									// hide the info text

	// update the energy values
	void updateEnergy(float en, float posEn){m_fEnergy = en; m_fPossibleEnergy = posEn;}

	void createFont();			// create the font resource
	void createInfo();			// create the info text

private:
	// OGRE variables
	SceneManager *m_pSceneMgr;
	CEGUI::System *m_pSystem;
    CEGUI::OgreCEGUIRenderer *m_pOCRenderer;

	// GUI elements
	Rectangle2D *m_pEnergyBar;
	Rectangle2D *m_pPossibleEnergyBar;
	Rectangle2D *m_pBackBox;	

	// general variables
	CRenderer *m_pRenderer;	// pointer to render instance
	float m_fEnergy;		// current energy
	float m_fPossibleEnergy;// energy after the shot
};

#endif