Added test for fogged label

This commit is contained in:
Pauli Nieminen 2008-09-08 07:50:29 +00:00
parent 190db928b9
commit a598e406af
2 changed files with 17 additions and 1 deletions

View File

@ -1065,6 +1065,15 @@ Ww, Ww, Ww, Ww
{CLEAR_VARIABLE temp_villages_area}
[/event]
[event]
name=prestart
[label]
x,y=2,11
text="Fogged oasis"
fogged=no
[/label]
[/event]
#define DYNAMIC_EVENT_SETUP TYPE VAR
[set_variables]
name={VAR}

View File

@ -507,8 +507,15 @@ void terrain_label::draw()
bool terrain_label::visible() const
{
if (!fogged_)
{
if (parent_->disp().fogged(loc_))
{
return false;
}
}
return (parent_->team_name() == team_name_
|| (team_name_.empty() && parent_->visible_global_label(loc_)) && !(parent_->disp().fogged(loc_) && fogged()));
|| (team_name_.empty() && parent_->visible_global_label(loc_)));
}
void terrain_label::check_text_length()