// Jason Brillante "Damdoshi"
// Hanged Bunny Studio 2014-2015
//
// Sewer Glue

#ifndef				__HBS_SEWER_GLUE_MENU_HPP__
# define			__HBS_SEWER_GLUE_MENU_HPP__
# include			<SFML/Audio.hpp>
# include			"Module.hpp"
# include			"SewerGlue.hpp"

namespace			hbs
{
  class				Menu : public hbs::Module
  {
  public:
    enum			Ressource
      {
	FIRST_RESSOURCE,
	BACKGROUND		= FIRST_RESSOURCE,
	FONT,
	MONSTER,
	LAST_RESSOURCE
      };

  protected:
    static const std::string	ressources_file[LAST_RESSOURCE];
    sf::Texture			ressources[LAST_RESSOURCE];
    sf::Sprite			sprites[LAST_RESSOURCE];

    int				intro_step;
    int				title_pos;
    int				title_back;

    int				cursor;

    void			Text(sf::RenderTarget	&screen,
				     const std::string	&str,
				     int		x,
				     int		y,
				     int		color = 0);

    bool			warping;
    hbs::SewerGlue::Klondike	destination;
    int				warp_animation;

    int				arriving;

    sf::Music			theme;

  public:
    bool			Start(hbs::SewerGlue		&sg);
    void			Reset(void);
    bool			Event(const sf::Event		&event);
    bool			Play(uint64_t			delay);
    void			Display(sf::RenderTarget	&x);

    Menu(void);
    virtual ~Menu(void);
  };
}

#endif	//			__HBS_SEWER_GLUE_MENU_HPP__
