summaryrefslogtreecommitdiff
path: root/src/View
diff options
context:
space:
mode:
Diffstat (limited to 'src/View')
-rw-r--r--src/View/CMakeLists.txt2
-rw-r--r--src/View/MainWindow.cpp25
-rw-r--r--src/View/MainWindow.hpp20
3 files changed, 47 insertions, 0 deletions
diff --git a/src/View/CMakeLists.txt b/src/View/CMakeLists.txt
new file mode 100644
index 0000000..9a13671
--- /dev/null
+++ b/src/View/CMakeLists.txt
@@ -0,0 +1,2 @@
+#Make Model lib
+add_library(View ./MainWindow.cpp)
diff --git a/src/View/MainWindow.cpp b/src/View/MainWindow.cpp
new file mode 100644
index 0000000..274fc8e
--- /dev/null
+++ b/src/View/MainWindow.cpp
@@ -0,0 +1,25 @@
+#include "MainWindow.hpp"
+
+
+
+
+
+
+MainWindow::MainWindow(int width, int height, std::string title):
+ RenderWindow(sf::VideoMode(width,height), title),
+ skin()
+{
+
+ //Define skin:
+ skin.push_back(sf::Color(250,248,239));
+
+
+}
+
+
+MainWindow::~MainWindow(){
+}
+
+void MainWindow::clearMW(){
+ RenderWindow::clear(skin.at(0));
+}
diff --git a/src/View/MainWindow.hpp b/src/View/MainWindow.hpp
new file mode 100644
index 0000000..a0e7c58
--- /dev/null
+++ b/src/View/MainWindow.hpp
@@ -0,0 +1,20 @@
+
+
+
+#include <iostream>
+#include <vector>
+#include <SFML/Window.hpp>
+#include <SFML/Graphics.hpp>
+
+
+class MainWindow : public sf::RenderWindow{
+
+ private:
+ std::vector<sf::Color> skin;
+ public:
+ MainWindow(int width, int height, std::string title);
+ ~MainWindow();
+
+ void clearMW();
+
+};