From f5f33da126a072ddacfdb8e5887054f4225d4d86 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Wed, 20 Mar 2019 02:13:36 +0000 Subject: Codechange: Implement OnTooltip event for custom window tooltips. This avoids windows from needing to know or care about tooltip delay settings. --- src/linkgraph/linkgraph_gui.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/linkgraph/linkgraph_gui.cpp') diff --git a/src/linkgraph/linkgraph_gui.cpp b/src/linkgraph/linkgraph_gui.cpp index 4db9f95b3..6844092c2 100644 --- a/src/linkgraph/linkgraph_gui.cpp +++ b/src/linkgraph/linkgraph_gui.cpp @@ -559,7 +559,7 @@ void LinkGraphLegendWindow::DrawWidget(const Rect &r, int widget) const } } -bool LinkGraphLegendWindow::OnHoverCommon(Point pt, int widget, TooltipCloseCondition close_cond) +bool LinkGraphLegendWindow::OnTooltip(Point pt, int widget, TooltipCloseCondition close_cond) { if (IsInsideMM(widget, WID_LGL_COMPANY_FIRST, WID_LGL_COMPANY_LAST + 1)) { if (this->IsWidgetDisabled(widget)) { @@ -584,19 +584,6 @@ bool LinkGraphLegendWindow::OnHoverCommon(Point pt, int widget, TooltipCloseCond return false; } -void LinkGraphLegendWindow::OnHover(Point pt, int widget) -{ - this->OnHoverCommon(pt, widget, TCC_HOVER); -} - -bool LinkGraphLegendWindow::OnRightClick(Point pt, int widget) -{ - if (_settings_client.gui.hover_delay_ms == 0) { - return this->OnHoverCommon(pt, widget, TCC_RIGHT_CLICK); - } - return false; -} - /** * Update the overlay with the new company selection. */ -- cgit v1.2.3-54-g00ecf