#pragma once #include #include "Command.h" #include "KeyboardCode.h" #include "MouseCode.h" class View; class Museum; class QuadTreeCollisionChecker; class ViewController { public: ViewController(Museum & m, View & v); virtual ~ViewController(); public: void update(); void ev_keydown(KeyboardCode code); void ev_mousedown(MouseCode code); void ev_mousemove(unsigned x, unsigned y); private: void update_size(); void update_tiles(); void update_artists(); void update_pathfinding(); void update_quadtree(); void update_quadtree_recursive(QuadTreeCollisionChecker * tree); private: Museum & museum; View & view; const Command * cmd_base = nullptr; private: bool draw_artists = true; bool draw_pathfinding = false; bool draw_quadtree = true; private: unsigned int scale = 16; unsigned int line_width = 0; unsigned int artist_size = (scale - line_width) / 2; std::pair mouse_pos = { 0, 0 }; };