/***********************************************************
 * God Mode On, Und[0]ne Devs < http://undonedevs.tk >
 * 2013 Pepe Romero < wizardpepe@gmail.com >
 * < https://bitbucket.org/undone_devs/god-mode-on >
 ***********************************************************/

#ifndef SetupState_H
#define SetupState_H

#include <Ogre.h>
#include <OIS.h>
#include <CEGUI.h>

#include "GameState.h"

class SetupState : public Ogre::Singleton<SetupState>, public GameState
{

public:
    SetupState();

    void enter ();
    void exit ();
    void pause ();
    void resume ();

    void keyPressed (const OIS::KeyEvent &e);
    void keyReleased (const OIS::KeyEvent &e);
    void mouseMoved (const OIS::MouseEvent &e);
    void mousePressed (const OIS::MouseEvent &e, OIS::MouseButtonID id);
    void mouseReleased (const OIS::MouseEvent &e, OIS::MouseButtonID id);

    bool frameStarted (const Ogre::FrameEvent& evt);
    bool frameEnded (const Ogre::FrameEvent& evt);

    // Heredados de Ogre::Singleton.
    static SetupState& getSingleton ();
    static SetupState* getSingletonPtr ();

    // Click Botones
    virtual bool handle_MouseClick_WindowBack();
    virtual bool handle_MouseClick_WindowSonido();
    virtual bool handle_MouseClick_WindowIdioma();

    // Mouse entra/sale botones
    virtual bool handle_MouseEnter_WindowBack();
    virtual bool handle_MouseEnter_WindowSonido();
    virtual bool handle_MouseEnter_WindowIdioma();
    virtual bool handle_MouseLeaves_WindowBack();
    virtual bool handle_MouseLeaves_WindowOpciones();

protected:
    Ogre::Root* _root;
    Ogre::SceneManager* _sceneMgr;
    Ogre::Viewport* _viewport;
    Ogre::Camera* _camera;

    CEGUI::Window *_sheet, *_background, *_buttonBack, *_buttonSonido, *_buttonIdioma, *_descripcion;
    CEGUI::MouseCursor *_mouse;

    bool _exitGame;
    bool _sonido;
    Ogre::String _idioma, _descripcionSonido, _descripcionIdioma;
};

#endif
