The attempt is to display a changing number in the editor status bar; for
proof-of-concept purposes it's a count of redraws, but I really want
it to be a count of villages on the map.

I've paralleled the code used to display mouseover position rather
exactly, but with no result on the status bar.

Index: src/editor/editor_display.cpp
===================================================================
--- src/editor/editor_display.cpp       (revision 22007)
+++ src/editor/editor_display.cpp       (working copy)
@@ -131,6 +131,15 @@
                refresh_report(reports::POSITION, reports::report(str2.str()));
        }
 
+       {
+               static int village_count = 0;
+               std::stringstream str3;
+               str3 << village_count;
+               village_count++;
+               refresh_report(reports::VILLAGES, reports::report(str3.str()));
+
+       }
+
        display::draw_wrap(update, force, changed);
 }
 
Index: data/themes/editor.cfg
===================================================================
--- data/themes/editor.cfg      (revision 22007)
+++ data/themes/editor.cfg      (working copy)
@@ -675,6 +675,13 @@
         [/mini_map]
 
         [status]
+            [villages]
+                font_size=12
+                rect=715,4,820,20
+                xanchor=proportional
+                yanchor=fixed
+            [/villages]
+
             [terrain]
                 font_size=12
                 rect=820,4,920,20


-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>

When only cops have guns, it's called a "police state".
        -- Claire Wolfe, "101 Things To Do Until The Revolution" 

_______________________________________________
Wesnoth-dev mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-dev

Reply via email to