// This is a Demo of the Irrlicht Engine (c) 2005 by N.Gebhardt.
// This file is not documentated.

#ifndef __C_MAIN_MENU_H_INCLUDED__
#define __C_MAIN_MENU_H_INCLUDED__

#include <irrlicht.h>
#include "CGameContext.h"

using namespace irr;

class CMainMenu : public IEventReceiver
{
public:

	CMainMenu();
	~CMainMenu();

	bool run(bool& outFullscreen, bool& outMusic, bool& outShadows,
		bool& outAdditive, bool &outVSync, bool& outAA,
		video::E_DRIVER_TYPE& outDriver);

	virtual bool OnEvent(const SEvent& event);
    core::stringw GetSelectedMap();
    core::stringw resolutionStr;

private:

	void setTransparency();

	gui::IGUIButton* startButton;
	gui::IGUIButton* continueButton;
	gui::IGUIButton* settingsButton;
	gui::IGUIButton* quitButton;

	gui::IGUIWindow* window;
    gui::IGUIComboBox* combobox;
    gui::IGUIButton* buttonOK;

    gui::IGUIWindow* windowSettings;
    gui::IGUIListBox* ListboxResolution;
    gui::IGUIButton* ButtonSave;
    gui::IGUIButton* ButtonExit;
    gui::IGUICheckBox* CheckboxFullscreen;

	IrrlichtDevice *MenuDevice;
	s32 selected;
	bool start;
	bool fullscreen;
	bool music;
	bool shadows;
	bool additive;
	bool transparent;
	bool vsync;
	bool aa;


	scene::ISceneNode* lightMapNode;
	scene::ISceneNode* dynamicNode;

	CGameContext *contexte;
	CSettingManager *settings;

	video::SColor SkinColor [ gui::EGDC_COUNT ];
	void getOriginalSkinColor();
	void createSettingsDialog();

};

#endif

