Fix #7386: Measurement tooltip for tunnels, aqueducts & docks did not display or flickered.

Measurement tooltip was auto-closed as the hover/right-click test for tooltips was not
satisfied in this case. This is fixed by keeping the tooltip visible and instead explicitly
closing the tooltip when the PlaceObject is cancelled/completed.
This commit is contained in:
peter1138
2019-03-20 01:21:10 +00:00
committed by PeterN
parent e3c639a09f
commit 4da83d2f66
3 changed files with 17 additions and 5 deletions

View File

@@ -873,8 +873,8 @@ void RelocateAllWindows(int neww, int newh);
/* misc_gui.cpp */
enum TooltipCloseCondition {
TCC_RIGHT_CLICK,
TCC_LEFT_CLICK,
TCC_HOVER,
TCC_NONE,
};
void GuiShowTooltips(Window *parent, StringID str, uint paramcount = 0, const uint64 params[] = NULL, TooltipCloseCondition close_tooltip = TCC_HOVER);