diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 14:36:41 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 14:36:41 +0200 |
commit | 64028952ceb17f97ded08f1ab7ec0b06c41e2b87 (patch) | |
tree | f792377f93ff30a41a0c559c67aa874a022d4763 /ViewController.h | |
parent | e522f2a36ee00a3e0890adb2c34bfc8431711265 (diff) |
add pathfinding start/end selection
Diffstat (limited to 'ViewController.h')
-rw-r--r-- | ViewController.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ViewController.h b/ViewController.h index 162ae19..d18e96a 100644 --- a/ViewController.h +++ b/ViewController.h @@ -2,9 +2,11 @@ #include <utility> +#include "Color.h" #include "Command.h" #include "KeyboardCode.h" #include "MouseCode.h" +#include "Rectangle.h" class View; class Museum; @@ -30,19 +32,26 @@ private: 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; const Command * cmd_base = nullptr; 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<float, float> mouse_pos = { 0, 0 }; }; |