summaryrefslogtreecommitdiff
path: root/src/linkgraph/linkgraph_gui.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/linkgraph/linkgraph_gui.h')
-rw-r--r--src/linkgraph/linkgraph_gui.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/linkgraph/linkgraph_gui.h b/src/linkgraph/linkgraph_gui.h
index b5a169e1b..c65e9a409 100644
--- a/src/linkgraph/linkgraph_gui.h
+++ b/src/linkgraph/linkgraph_gui.h
@@ -89,4 +89,25 @@ protected:
static void DrawVertex(int x, int y, int size, int colour, int border_colour);
};
+void ShowLinkGraphLegend();
+
+/**
+ * Menu window to select cargoes and companies to show in a link graph overlay.
+ */
+struct LinkGraphLegendWindow : Window {
+public:
+ LinkGraphLegendWindow(const WindowDesc *desc, int window_number);
+ void SetOverlay(LinkGraphOverlay *overlay);
+
+ virtual void DrawWidget(const Rect &r, int widget) const;
+ virtual void OnClick(Point pt, int widget, int click_count);
+ virtual void OnInvalidateData(int data = 0, bool gui_scope = true);
+
+private:
+ LinkGraphOverlay *overlay;
+
+ void UpdateOverlayCompanies();
+ void UpdateOverlayCargoes();
+};
+
#endif /* LINKGRAPH_GUI_H */