summaryrefslogtreecommitdiff
path: root/src/linkgraph/linkgraph_gui.h
diff options
context:
space:
mode:
authorJonathan G Rennison <j.g.rennison@gmail.com>2018-06-24 12:00:41 +0100
committerMichael Lutz <michi@icosahedron.de>2018-06-24 20:18:10 +0200
commitdc8fff2c4da52036f881e6e9bb58a867b78124d0 (patch)
tree961c8133d999f12b4d2154eb38c01e9e0db9b6e9 /src/linkgraph/linkgraph_gui.h
parent6298b9657103f5dca0f85c1117e720530cc4b037 (diff)
downloadopenttd-dc8fff2c4da52036f881e6e9bb58a867b78124d0.tar.xz
Add: Hover tool-tips to cargo dest flow legend window.
This is to improve the usability of the window. The two-letter abbreviations are not always clear, in particular when using a large number of cargoes. The company colours can be ambiguous when there are a large number of companies.
Diffstat (limited to 'src/linkgraph/linkgraph_gui.h')
-rw-r--r--src/linkgraph/linkgraph_gui.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/linkgraph/linkgraph_gui.h b/src/linkgraph/linkgraph_gui.h
index 12f1f6e73..a933bfc68 100644
--- a/src/linkgraph/linkgraph_gui.h
+++ b/src/linkgraph/linkgraph_gui.h
@@ -15,6 +15,7 @@
#include "../company_func.h"
#include "../station_base.h"
#include "../widget_type.h"
+#include "../window_gui.h"
#include "linkgraph_base.h"
#include <map>
#include <vector>
@@ -101,6 +102,8 @@ public:
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize);
virtual void DrawWidget(const Rect &r, int widget) const;
+ virtual void OnHover(Point pt, int widget);
+ virtual bool OnRightClick(Point pt, int widget);
virtual void OnClick(Point pt, int widget, int click_count);
virtual void OnInvalidateData(int data = 0, bool gui_scope = true);
@@ -109,6 +112,7 @@ private:
void UpdateOverlayCompanies();
void UpdateOverlayCargoes();
+ bool OnHoverCommon(Point pt, int widget, TooltipCloseCondition close_cond);
};
#endif /* LINKGRAPH_GUI_H */