// Author : Chris Tolley
// Date   : 8/30/2004
// Menu.h contains the class declaration for a animated menu to use
// with OpenGL

#if !defined(AFX_MENU_H__C628A190_52AF_455A_823D_05E22CE3C806__INCLUDED_)
#define AFX_MENU_H__C628A190_52AF_455A_823D_05E22CE3C806__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <vector>
using std::vector;

#include "MenuOption.h"

// Forward class declarations
class CInputSystem;
class HiResTimer;


// An enum indicating the return value from this menu
enum MenuChoice
{
	// Indicates that the user has not made a choice
	MENU,
	// Indicates that the user wants to play the game
	GAME,
	// Indicates that the user wants to observe the bugs on their own
	SPECTATE,
	// Indicates that the user wants to exit
	EXIT
};// End enum MenuChoice

class Menu
{
public:
	// Constructor
	Menu();

	// Destructor
	virtual ~Menu();

	// Updates the menu and returns a state used to control the game
	enum MenuChoice Update();

	// Renders the menu options to the screen
	void Render();

	// Sets the input system up
	void SetInput( CInputSystem* input ) { m_Input = input; };

	// Sets the poiter to the timer up
	void SetTimer( HiResTimer* timer ) { m_Timer = timer; };

	// Adds a menu option and a return value for that option
	void AddOption( const char* bmpFile, enum MenuChoice choice );
private:
	// The index to the current menu option
	int m_iIndex;

	// A place to hold all the menu options
	vector< MenuOption > m_vOptions;

	// A place to hold the choices associated with each option
	vector< enum MenuChoice > m_vChoice;

	// The input system this menu is running off of
	CInputSystem* m_Input;

	// The high resolution timer that will drive the menu
	HiResTimer* m_Timer;

	// Flags to keep track of a key press
	bool m_bLeft;
	bool m_bRight;
	bool m_bEnter;
};

#endif // !defined(AFX_MENU_H__C628A190_52AF_455A_823D_05E22CE3C806__INCLUDED_)
