Author: esr
Date: Mon Jul 16 15:39:18 2007
New Revision: 18829
URL: http://svn.gna.org/viewcvs/wesnoth?rev=18829&view=rev
Log:
The editor gets its terrain display back.
Modified:
trunk/src/editor/editor_display.cpp
Modified: trunk/src/editor/editor_display.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor/editor_display.cpp?rev=18829&r1=18828&r2=18829&view=diff
==============================================================================
--- trunk/src/editor/editor_display.cpp (original)
+++ trunk/src/editor/editor_display.cpp Mon Jul 16 15:39:18 2007
@@ -99,6 +99,29 @@
wassert(invalidated_.empty());
}
+ // fill in the terrain report
+ if(map_.on_board(mouseoverHex_)) {
+ const t_translation::t_letter terrain =
map_.get_terrain(mouseoverHex_);
+ const t_translation::t_list& underlying =
map_.underlying_union_terrain(terrain);
+
+ std::stringstream str;
+ str << map_.get_terrain_info(terrain).name();
+ if(underlying.size() != 1 || underlying.front() != terrain) {
+ str << " (";
+
+ for(t_translation::t_list::const_iterator i =
+ underlying.begin(); i !=
underlying.end(); ++i) {
+
+ str << map_.get_terrain_info(*i).name();
+ if(i+1 != underlying.end()) {
+ str << ",";
+ }
+ }
+ str << ")";
+ }
+ refresh_report(reports::TERRAIN, reports::report(str.str()));
+ }
+
display::draw_wrap(update, force, changed);
}
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits