This repository has been archived on 2024-01-18. You can view files and clone it, but cannot push or open issues or pull requests.
DamesEtCo/includes/Ecran.hpp

22 lines
642 B
C++

#pragma once
#include <SFML/Graphics.hpp>
#include <functional>
struct Ecran {
// Fenêtre
static sf::RenderWindow window;
Ecran(const uint width = 800, const uint height = 800,
const std::string name = "Projet"); // constructor
~Ecran(); // destructor
void afficher(
/* Function called at each frame */
const std::function<void()> drawEachFrame = {[]() {}},
/* Take 2 arguments: position X, position Y
* -> called each time user left-click */
const std::function<void(const int, const int)> doOnClick = {
[](const int, const int) {}}) const;
};