Author: boucman
Date: Sat Jun  2 11:06:22 2007
New Revision: 18014

URL: http://svn.gna.org/viewcvs/wesnoth?rev=18014&view=rev
Log:
extra text when a strike hits (like poisonned message) is properly centered 
again

Modified:
    trunk/changelog
    trunk/src/unit_display.cpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=18014&r1=18013&r2=18014&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sat Jun  2 11:06:22 2007
@@ -26,6 +26,7 @@
    * fix bug #4299: word wrap for menus with very long option strings
    * various bugfixes and code cleanups
    * removed zipios support
+   * poisonned/stoned text is properly centered again
    
 Version 1.3.3:
  * campaigns:

Modified: trunk/src/unit_display.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_display.cpp?rev=18014&r1=18013&r2=18014&view=diff
==============================================================================
--- trunk/src/unit_display.cpp (original)
+++ trunk/src/unit_display.cpp Sat Jun  2 11:06:22 2007
@@ -366,7 +366,10 @@
                        sound_played = true;
                        std::string text ;
                        if(damage) text = lexical_cast<std::string>(damage);
-                       if(!hit_text.empty()) text = text + "\n" + hit_text;
+                       if(!hit_text.empty()) {
+                               text.insert(text.begin(),hit_text.size()/2,' ');
+                               text = text + "\n" + hit_text;
+                       }
                        sound::play_sound(defender.get_hit_sound());
                        disp->float_label(b,text,255,0,0);
                        disp->invalidate_unit();
@@ -490,7 +493,10 @@
                        sound_played = true;
                        std::string text ;
                        if(damage) text = lexical_cast<std::string>(damage);
-                       if(!hit_text.empty()) text = text + "\n" + hit_text;
+                       if(!hit_text.empty()) {
+                               text.insert(text.begin(),hit_text.size()/2,' ');
+                               text = text + "\n" + hit_text;
+                       }
                        sound::play_sound(defender.get_hit_sound());
                        disp->float_label(b,text,255,0,0);
                        disp->invalidate_unit();


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

Reply via email to