From 920ae293f6830833146a524345dfbf00669e785b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 8 Oct 2022 18:40:58 +0100 Subject: Add a rather dumb builder for joining nodes --- ui/editNetwork.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ui/editNetwork.cpp') diff --git a/ui/editNetwork.cpp b/ui/editNetwork.cpp index a51d7fb..3ab7059 100644 --- a/ui/editNetwork.cpp +++ b/ui/editNetwork.cpp @@ -1,4 +1,5 @@ #include "editNetwork.h" +#include "builders/join.h" #include "builders/straight.h" #include "text.h" #include @@ -7,6 +8,7 @@ EditNetwork::EditNetwork(Network * n) : network {n}, builderToolbar { {"ui/icon/network.png", mode.toggle()}, + {"ui/icon/network.png", mode.toggle()}, } { } @@ -16,7 +18,7 @@ EditNetwork::~EditNetwork() = default; bool EditNetwork::click(const SDL_MouseButtonEvent & e, const Ray & ray) { - if (builder) { + if (builder && (e.button == SDL_BUTTON_LEFT || e.button == SDL_BUTTON_MIDDLE)) { builder->click(network, gameState->geoData.get(), e, ray); return true; } -- cgit v1.2.3