From 64028952ceb17f97ded08f1ab7ec0b06c41e2b87 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 23 Oct 2024 14:36:41 +0200 Subject: add pathfinding start/end selection --- ViewController.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ViewController.h') diff --git a/ViewController.h b/ViewController.h index 162ae19..d18e96a 100644 --- a/ViewController.h +++ b/ViewController.h @@ -2,9 +2,11 @@ #include +#include "Color.h" #include "Command.h" #include "KeyboardCode.h" #include "MouseCode.h" +#include "Rectangle.h" class View; class Museum; @@ -29,6 +31,10 @@ private: void update_quadtree(); void update_quadtree_recursive(QuadTreeCollisionChecker * tree); +private: + void draw_pathfinding_dot(unsigned int x, unsigned int y, const Color & c); + Rectangle center(Rectangle); + private: Museum & museum; View & view; @@ -36,13 +42,16 @@ private: private: bool draw_artists = true; - bool draw_pathfinding = false; + bool draw_pathfinding = true; bool draw_quadtree = true; private: unsigned int scale = 16; unsigned int line_width = 0; unsigned int artist_size = (scale - line_width) / 2; + unsigned int pathfinding_size = scale - 4; + +private: std::pair mouse_pos = { 0, 0 }; }; -- cgit v1.2.3