// Author : Chris Tolley
// Date   : 8/29/2004
// MenuOption.h contains the class declaration for a menu option to use in 
// the game Survival

#if !defined(AFX_MENUOPTION_H__F92AA2ED_71E9_4939_A20F_09FF18C16329__INCLUDED_)
#define AFX_MENUOPTION_H__F92AA2ED_71E9_4939_A20F_09FF18C16329__INCLUDED_

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

#include <vector>
using std::vector;

// A struct to hold the data for a menu element
struct mixel
{
	// The color of this mixel
	float Color_[3];

	// The current position of this mixel
	float Position_[3];

	// The starting place of this mixel
	float StartPos_[3];

	// The destination of this mixel
	float EndPos_[3];
};// End struct mixel


// An enum to keep track of which state this menu is in
enum MenuOptionState
{
	// The mixels are all scattered
	SCATTERED,
	// The mixels are gathering
	GATHERING,
	// The mixels are all gathering
	GATHERED,
	// The mixels are all scattering
	SCATTERING
};// End enum MenuOptionState

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

	// Constructor with arguments
	MenuOption( const char* bmpFile );

	// Destructor
	virtual ~MenuOption();

	// Loads all the data for this mixel
	void Load( const char* bmpFile );

	// Sets this menu's state
	void SetState( enum MenuOptionState state );

	// Returns the current state
	inline enum MenuOptionState GetState() const { return m_mosState; };

	// Updates each mixel in this menu option
	void Update( float elapsedSec );

	// Renders this MenuOption to the screen
	void Render();
private:
	// The vector of mixel's
	vector< mixel > m_vMixels;

	// The percentage that this option is through in animation
	float m_fPercent;

	// A number to multiple the elapsedSecs by which makes the menu option
	// either gather or seperate
	int m_iDirection;

	// The current state of this menu option
	MenuOptionState m_mosState;
};

#endif // !defined(AFX_MENUOPTION_H__F92AA2ED_71E9_4939_A20F_09FF18C16329__INCLUDED_)
