#pragma once

#include "..\GameGUI\Menu.h"
#include "..\GameGUI\CheckBox.h"
#include "..\GameGUI\RadioButton.h"
#include "..\GameGUI\Panel.h"
#include "..\GameGUI\Slider.h"
#include "..\GameGUI\ComboBox.h"

class ShadowApp;

class MainMenu : public Menu
{
	ShadowApp* m_pApp;

	Panel*	  m_pnBack;

	CheckBox* m_ckUseLispSM;
	CheckBox* m_ckDrawObjects;
	CheckBox* m_ckUpdateDynamicObjects;
	CheckBox* m_ckWireframe;
	CheckBox* m_ckShowSM;
	CheckBox* m_ckUseDebugCam;
	CheckBox* m_ckUseID;
	CheckBox* m_ckUsePrimID;
	CheckBox* m_ckUseSSAO;
	CheckBox* m_ckSMFiltering;
	
	Button* m_btnResetCam;
	Button* m_btnReloadShaders;

	RadioButton* m_rbTerrain;
	RadioButton* m_rbPowerPlant;

	ComboBox* m_cbShadowMethod;
	ComboBox* m_cbSMSize;
	//ComboBox* m_cbJitterType;
	ComboBox* m_cbVisType;
	ComboBox* m_cbWPT;

	Label* m_lbConstBias;
	Label* m_lbSlopeBias;
	Label* m_lbLambertScale;

	Slider* m_slConstBias;
	Slider* m_slSlopeBias;
	Slider* m_slLambertScale;
		
	static void OnLispSMCheck(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	static void OnDrawObjectsCheck(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	static void OnDrawUpdateDynamicObjectsCheck(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	static void OnWireframeCheck(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	static void OnShowSMCheck(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	static void OnUseDebugCamCheck(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	static void OnUseIDCheck(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	static void OnUsePrimIDCheck(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	static void OnUseSSAO(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	static void OnSMFiltering(GUIElement* const sender, const GUIEVENT evnt, void* pData);

	static void OnResetCam(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	static void OnReloadShaders(GUIElement* const sender, const GUIEVENT evnt, void* pData);

	static void OnTerrainChanged(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	static void OnPowerPlantChanged(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	
	static void OnShadowMethodChanged(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	static void OnSMSizeChanged(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	//static void OnJitterTypeChanged(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	static void OnVisTypeChanged(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	static void OnWPTChanged(GUIElement* const sender, const GUIEVENT evnt, void* pData);

	static void OnConstBiasChanged(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	static void OnSlopeBiasChanged(GUIElement* const sender, const GUIEVENT evnt, void* pData);
	static void OnLambertScaleChanged(GUIElement* const sender, const GUIEVENT evnt, void* pData);

public:
	MainMenu(MenuManager* const pManager, ShadowApp* const app);
	~MainMenu(void);

	virtual void OnUpdate(void);
};
