Remove redundant scrolling functions for map labels
This commit is contained in:
parent
f1f0d96e36
commit
8eb001c684
3 changed files with 1 additions and 28 deletions
|
@ -1419,7 +1419,6 @@ bool display::scroll(int xmove, int ymove)
|
||||||
if(dx == 0 && dy == 0)
|
if(dx == 0 && dy == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
labels().scroll(dx, dy);
|
|
||||||
font::scroll_floating_labels(dx, dy);
|
font::scroll_floating_labels(dx, dy);
|
||||||
|
|
||||||
surface screen(screen_.getSurface());
|
surface screen(screen_.getSurface());
|
||||||
|
|
|
@ -234,17 +234,6 @@ void map_labels::clear_all()
|
||||||
labels_.clear();
|
labels_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void map_labels::scroll(double xmove, double ymove)
|
|
||||||
{
|
|
||||||
for(team_label_map::const_iterator i = labels_.begin(); i != labels_.end(); ++i)
|
|
||||||
{
|
|
||||||
for (label_map::const_iterator j = i->second.begin(); j != i->second.end(); ++j)
|
|
||||||
{
|
|
||||||
j->second->scroll(xmove, ymove);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void map_labels::recalculate_labels()
|
void map_labels::recalculate_labels()
|
||||||
{
|
{
|
||||||
foreach (team_label_map::value_type &m, labels_)
|
foreach (team_label_map::value_type &m, labels_)
|
||||||
|
@ -417,17 +406,6 @@ void terrain_label::update_info(const std::string& text,
|
||||||
draw();
|
draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
void terrain_label::scroll(const double xmove,
|
|
||||||
const double ymove) const
|
|
||||||
{
|
|
||||||
if(handle_)
|
|
||||||
{
|
|
||||||
font::move_floating_label(handle_,
|
|
||||||
xmove,
|
|
||||||
ymove);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void terrain_label::recalculate()
|
void terrain_label::recalculate()
|
||||||
{
|
{
|
||||||
draw();
|
draw();
|
||||||
|
@ -473,7 +451,7 @@ void terrain_label::draw()
|
||||||
parent_->disp().map_outside_area(),
|
parent_->disp().map_outside_area(),
|
||||||
font::CENTER_ALIGN,
|
font::CENTER_ALIGN,
|
||||||
NULL, 0,
|
NULL, 0,
|
||||||
font::ANCHOR_LABEL_SCREEN,
|
font::ANCHOR_LABEL_MAP,
|
||||||
use_markup
|
use_markup
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,6 @@ public:
|
||||||
|
|
||||||
void clear(const std::string&);
|
void clear(const std::string&);
|
||||||
|
|
||||||
void scroll(double xmove, double ymove);
|
|
||||||
|
|
||||||
void recalculate_labels();
|
void recalculate_labels();
|
||||||
bool visible_global_label(const map_location&) const;
|
bool visible_global_label(const map_location&) const;
|
||||||
|
|
||||||
|
@ -113,8 +111,6 @@ public:
|
||||||
const std::string&,
|
const std::string&,
|
||||||
const SDL_Color);
|
const SDL_Color);
|
||||||
|
|
||||||
void scroll(double xmove, double ymove) const;
|
|
||||||
|
|
||||||
void recalculate();
|
void recalculate();
|
||||||
void calculate_shroud() const;
|
void calculate_shroud() const;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue