misc_gui.c
changeset 4884 895f06b87934
parent 4850 b4e9be22945f
child 4909 ef77bf81545c
--- a/misc_gui.c	Wed Oct 18 13:17:46 2006 +0000
+++ b/misc_gui.c	Wed Oct 18 14:20:10 2006 +0000
@@ -665,18 +665,18 @@
 * @param str String to be displayed
 * @param params (optional) up to 5 pieces of additional information that may be
 * added to a tooltip; currently only supports parameters of {NUM} (integer) */
-void GuiShowTooltipsWithArgs(StringID str, uint paramcount, uint32 params[])
+void GuiShowTooltipsWithArgs(StringID str, uint paramcount, const uint32 params[])
 {
 	char buffer[512];
 	BoundingRect br;
+	Window *w;
 	uint i;
 	int x, y;
 
-	Window *w = FindWindowById(WC_TOOLTIPS, 0);
-	if (w != NULL) DeleteWindow(w);
+	DeleteWindowById(WC_TOOLTIPS, 0);
 
-	/* We only show measurement tooltips with shift pressed down */
-	if (paramcount != 0 && !_patches.measure_tooltip) return;
+	/* We only show measurement tooltips with patch setting on */
+	if (str == STR_NULL || (paramcount != 0 && !_patches.measure_tooltip)) return;
 
 	for (i = 0; i != paramcount; i++) SetDParam(i, params[i]);
 	GetString(buffer, str);