summaryrefslogtreecommitdiff
path: root/src/Controllers/SFMLController/SFMLController.cpp
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2015-05-03 14:19:30 +0200
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2015-05-03 14:19:30 +0200
commitce3f721e16c779d519c04469e49a65f60546ab8d (patch)
tree9ebe9613d2393823079942517681306df8e6ff70 /src/Controllers/SFMLController/SFMLController.cpp
parentddaf5ba3ba3954c2b8a9926adbd3a066d8f0316c (diff)
Add first version of SFMLController and View class
Diffstat (limited to 'src/Controllers/SFMLController/SFMLController.cpp')
-rw-r--r--src/Controllers/SFMLController/SFMLController.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/Controllers/SFMLController/SFMLController.cpp b/src/Controllers/SFMLController/SFMLController.cpp
new file mode 100644
index 0000000..09a3c25
--- /dev/null
+++ b/src/Controllers/SFMLController/SFMLController.cpp
@@ -0,0 +1,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();
+ }
+
+
+}