Fix glitches with the unit sidebar status icons (invisible, slowed, poisoned..)

- mouseover on an unit displayed its info in the sidebar but the
status icons disappeared when the mouse leaved the unit.

- stop using the invisible icon about the hex under the mouse (was not
obvious that it was not the current status, see bug #9288, and broke
tooltip use)

PS: I will commit later a new visual clue to replace this mouseover feature.
This commit is contained in:
Ali El Gariani 2007-12-20 21:07:16 +00:00
parent 824ad1e729
commit ccb23fd064
2 changed files with 1 additions and 8 deletions

View file

@ -502,7 +502,6 @@ void game_display::draw_report(reports::TYPE report_num)
void game_display::draw_game_status()
{
if(teams_.empty()) {
return;
}
@ -510,9 +509,6 @@ void game_display::draw_game_status()
for(size_t r = reports::STATUS_REPORTS_BEGIN; r != reports::STATUS_REPORTS_END; ++r) {
draw_report(reports::TYPE(r));
}
// The mouse-over needs to update the visibility icon
draw_report(reports::UNIT_STATUS);
}
void game_display::draw_sidebar()

View file

@ -90,10 +90,7 @@ report generate_report(TYPE type,
std::stringstream tooltip;
report res;
// We call invisible with see_all=false to avoid cheat-detection of hidden enemies.
// Don't display the icon on shrouded location to prevent cheat-detection of terrain.
if(map.on_board(mouseover) && !current_team.shrouded(mouseover)
&& u->second.invisible(mouseover,units,teams,false))
if(map.on_board(u->first) && u->second.invisible(u->first,units,teams))
{
unit_status << "misc/invisible.png";
tooltip << _("invisible: ") << _("This unit is invisible. It cannot be seen or attacked by enemy units.");