diff options
author | Darkvater <darkvater@openttd.org> | 2006-10-18 14:20:10 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-10-18 14:20:10 +0000 |
commit | 2d48fd2861133a463d979807c377549341eef447 (patch) | |
tree | 3ed32c4e6af96b0c764cf8fe0d43640948022db1 /misc_gui.c | |
parent | 68314cf576b7c28e1132d9d640af2205c0484ff1 (diff) | |
download | openttd-2d48fd2861133a463d979807c377549341eef447.tar.xz |
(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 ;)
Diffstat (limited to 'misc_gui.c')
-rw-r--r-- | misc_gui.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/misc_gui.c b/misc_gui.c index aece882c5..68e125e4f 100644 --- a/misc_gui.c +++ b/misc_gui.c @@ -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); |