#ifndef __GRAPHICENGINE_H__
#define __GRAPHICENGINE_H__
#include <cstdlib>
#include <iostream>
#include <string>
#include <deque>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include "engine.hpp"
#include "eventHandler.hpp"
class cGraphicEngine : public cEngine
{
private:
sf::RenderWindow* mApplication;
sf::Color mBackgroundColor;
std::deque<sf::Sprite> spriteList; int incSprite; std::deque<bool> hideSpriteList; std::deque<sf::Image> imageList;
std::deque<sf::String> stringList; int incString; std::deque<bool> hideStringList; std::deque<sf::Font> fontList;
void controlColor (int* color);
public:
cGraphicEngine (const int& width, const int& height, const char* title);
~cGraphicEngine (void);
cEventHandler mEventHandler;
void setBackgroundColor (int red, int green, int blue);
bool updateEvent (void);
void frame (void);
// Surfaces management
int addSprite (const char* spriteName, float posX = 0.f, float posY = 0.f);
int addString (const char* textName, const char* fontName = "", const int& size = 30.f, const int& posX = 0, const int& posY = 0);
void hideSurface (const int& ref, const bool& hide = true);
void moveSurface (const int& ref, const float& moveX, const float& moveY);
void deleteSurfaces (void);
};
#endif // __GRAPHICENGINE_H__