(svn r6821) -Codechange: For the measurement tool do not show the tooltip when the selection

is only a single tile. Seems this was a bit annoying to some ;)
This commit is contained in:
Darkvater
2006-10-18 14:20:10 +00:00
parent 83bed39106
commit 5e248781a8
3 changed files with 48 additions and 42 deletions

View File

@@ -665,18 +665,18 @@ static void TooltipsWndProc(Window *w, WindowEvent *e)
* @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);