diff options
-rw-r--r-- | View.cpp | 2 | ||||
-rw-r--r-- | View.h | 7 | ||||
-rw-r--r-- | input/test.xml | 2 | ||||
-rw-r--r-- | main.cpp | 7 |
4 files changed, 7 insertions, 11 deletions
@@ -4,7 +4,7 @@ #include "View.h" #include "ViewController.h" -View::View(ViewController & vc) : controller(vc) { +View::View(Museum & m) : controller(m) { this->worker = new std::thread(&View::work, this); } @@ -5,12 +5,11 @@ #include "Color.h" #include "Rectangle.h" - -class ViewController; +#include "ViewController.h" class View { public: - View(ViewController & vc); + View(Museum & m); virtual ~View(); public: @@ -27,7 +26,7 @@ public: bool open = true; private: - ViewController & controller; + ViewController controller; private: unsigned int width = 0, height = 0; diff --git a/input/test.xml b/input/test.xml index 8258501..de8a973 100644 --- a/input/test.xml +++ b/input/test.xml @@ -4,7 +4,7 @@ <nodeType tag="Y" red="255" green="255" blue="0"/> <nodeType tag="B" red="0" green="0" blue="255"/> <nodeType tag="R" red="255" green="0" blue="0"/> - <nodeType tag="G" red="0" green="255" blue="0"/> + <nodeType tag="G" red="127" green="127" blue="127"/> </nodeTypes> <nodes> <Y x="0" y="0"/> @@ -31,6 +31,7 @@ static void parse(FileStrategy & file, Deserializer & deserializer, const char * int main(int argc, char** argv) { Museum museum {}; + museum.set_pause(true); Deserializer deserializer { museum }; @@ -42,11 +43,7 @@ int main(int argc, char** argv) { parse(*file, deserializer, url); } - // printf("%s", museum.canvas.to_string(true).c_str()); - // printf("%s", museum.people.to_string().c_str()); - - ViewController controller { museum }; - View view { controller }; + View view { museum }; museum.set_pause(false); |