diff options
author | peter1138 <peter1138@openttd.org> | 2019-03-20 02:13:36 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-03-20 23:00:32 +0000 |
commit | f5f33da126a072ddacfdb8e5887054f4225d4d86 (patch) | |
tree | 8980086c1c703ff55136a13ca2fbf204d95b22f8 /src/linkgraph/linkgraph_gui.h | |
parent | 4da83d2f661691b40eb53591d2a998596f5d16a0 (diff) | |
download | openttd-f5f33da126a072ddacfdb8e5887054f4225d4d86.tar.xz |
Codechange: Implement OnTooltip event for custom window tooltips.
This avoids windows from needing to know or care about tooltip delay settings.
Diffstat (limited to 'src/linkgraph/linkgraph_gui.h')
-rw-r--r-- | src/linkgraph/linkgraph_gui.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/linkgraph/linkgraph_gui.h b/src/linkgraph/linkgraph_gui.h index 93ec66629..17fcd28b2 100644 --- a/src/linkgraph/linkgraph_gui.h +++ b/src/linkgraph/linkgraph_gui.h @@ -106,8 +106,7 @@ 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 bool OnTooltip(Point pt, int widget, TooltipCloseCondition close_cond); virtual void OnClick(Point pt, int widget, int click_count); virtual void OnInvalidateData(int data = 0, bool gui_scope = true); @@ -116,7 +115,6 @@ private: void UpdateOverlayCompanies(); void UpdateOverlayCargoes(); - bool OnHoverCommon(Point pt, int widget, TooltipCloseCondition close_cond); }; #endif /* LINKGRAPH_GUI_H */ |