summaryrefslogtreecommitdiff
path: root/ui/editNetwork.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-10-14 18:15:53 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2022-10-14 18:15:53 +0100
commit0d59b73de4e51a3a5b3c680f3dca97c2b942cc09 (patch)
treea4db615632e0d0ce7f4edb5cf57e60d39198bc87 /ui/editNetwork.h
parentNetwork candidate links (diff)
downloadilt-0d59b73de4e51a3a5b3c680f3dca97c2b942cc09.tar.bz2
ilt-0d59b73de4e51a3a5b3c680f3dca97c2b942cc09.tar.xz
ilt-0d59b73de4e51a3a5b3c680f3dca97c2b942cc09.zip
Builders manage a collection of candidate links rendered by the base builder
Diffstat (limited to 'ui/editNetwork.h')
-rw-r--r--ui/editNetwork.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/editNetwork.h b/ui/editNetwork.h
index bd01eb8..df89cdc 100644
--- a/ui/editNetwork.h
+++ b/ui/editNetwork.h
@@ -6,6 +6,7 @@
#include "worldOverlay.h"
#include <game/gamestate.h>
#include <game/network/network.h>
+#include <gfx/models/texture.h>
#include <optional>
class Ray;
@@ -26,11 +27,15 @@ public:
class Builder {
public:
virtual ~Builder() = default;
- virtual void render(const Shader & shader) const = 0;
+ virtual void render(const Shader & shader) const;
virtual std::string hint() const = 0;
virtual void click(Network *, const GeoData *, const SDL_MouseButtonEvent &, const Ray &) = 0;
+ virtual void move(Network *, const GeoData *, const SDL_MouseMotionEvent &, const Ray &) = 0;
using Ptr = std::unique_ptr<Builder>;
+
+ protected:
+ Collection<const Link> candidateLinks;
};
private:
@@ -38,6 +43,7 @@ private:
Builder::Ptr builder;
Mode<Builder::Ptr, ModeSecondClick::NoAction> mode {builder};
Toolbar builderToolbar;
+ Texture blue;
};
template<typename T> class EditNetworkOf : public EditNetwork {