summaryrefslogtreecommitdiff
path: root/src/Controllers/SFMLController/SFMLController.cpp
blob: 09a3c25a2330fac996ac7de9cdc6859e724218c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "SFMLController.hpp"






SFMLController::SFMLController() : m_MainWindow(800,800, "2P11"){

}


SFMLController::~SFMLController(){

}




void SFMLController::run(){

	while(m_MainWindow.isOpen()){


		sf::Event event;
		while (m_MainWindow.pollEvent(event))
		{
			// évènement "fermeture demandée" : on ferme la fenêtre
			if (event.type == sf::Event::Closed)
				m_MainWindow.close();
		}
		m_MainWindow.clearMW();
		m_MainWindow.display();
	}


}