News:

Congratulations!
 You've won the News Item Lottery! Your prize? Reading this news item! :)

[r9497] tooltip is not shown for scripted tool icon in menubars

Started by THLeaderH, December 10, 2020, 12:01:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

THLeaderH

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
using exec_script_base_t::get_tooltip;

Replacing this code with
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?

Dwachs

Thanks for the report. I was under the impression that 'using' had this effect, which it has not, apparently.
Parsley, sage, rosemary, and maggikraut.

Dwachs

Parsley, sage, rosemary, and maggikraut.