summaryrefslogtreecommitdiff
path: root/src/interface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface.cpp')
-rw-r--r--src/interface.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/interface.cpp b/src/interface.cpp
index 17c1727..0650889 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -48,7 +48,12 @@ void state_t::tick(void)
return;
case sf::Event::MouseButtonPressed:
- if (event.mouseButton.button == 1) {
+ if (event.mouseButton.button == 0) {
+ v2f_t point = window->mapPixelToCoords(
+ sf::Vector2i(event.mouseButton.x,
+ event.mouseButton.y));
+ game->debug_click(point);
+ } else if (event.mouseButton.button == 1) {
camera.dragging = true;
camera.drag_ref = window->mapPixelToCoords(
sf::Vector2i(event.mouseButton.x,