The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: THLeaderH on December 10, 2020, 12:01:33 PM

Title: [r9497] tooltip is not shown for scripted tool icon in menubars
Post by: THLeaderH on December 10, 2020, 12:01:33 PM
In r9497, tooltip is not shown for scripted tool icon in menubars. I think this is because get_tooltip() function is not correctly overridden and tool_t::get_tooltip() is called, that returns empty text.

In tool_exec_script_t and tool_exec_two_click_script_t, there is a line
Code: [Select]
using exec_script_base_t::get_tooltip;
Replacing this code with
Code: [Select]
const char *get_tooltip(const player_t *pl) const OVERRIDE { return exec_script_base_t::get_tooltip(pl); }solved the problem with my compiler.

I think "using" statement cannot be a substitute of override, but Dwachs, does this statement work as override?
Title: Re: [r9497] tooltip is not shown for scripted tool icon in menubars
Post by: Dwachs on December 10, 2020, 12:36:45 PM
Thanks for the report. I was under the impression that 'using' had this effect, which it has not, apparently.
Title: Re: [r9497] tooltip is not shown for scripted tool icon in menubars
Post by: Dwachs on December 11, 2020, 09:34:03 AM
in r9498. Thank you