Ejemplo n.º 1
0
void map_labels::read(const config &cfg)
{
	clear_all();

	for (const config &i : cfg.child_range("label"))
	{
		const map_location loc(i, resources::gamedata);
		terrain_label *label = new terrain_label(*this, i);
		add_label(loc, label);
	}
	recalculate_labels();
}
Ejemplo n.º 2
0
void map_labels::read(const config &cfg)
{
	clear_all();

	BOOST_FOREACH(const config &i, cfg.child_range("label"))
	{
		const map_location loc(i, resources::state_of_game);
		terrain_label *label = new terrain_label(*this, i);
		add_label(loc, label);
	}
	recalculate_labels();
}
Ejemplo n.º 3
0
void map_labels::enable(bool is_enabled) {
	if (is_enabled != enabled_) {
		enabled_ = is_enabled;
		recalculate_labels();
	}
}