mail[Wesnoth-commits] r20722 - /trunk/src/intro.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by alinktomine on September 26, 2007 - 18:30:
Author: alink
Date: Wed Sep 26 18:30:13 2007
New Revision: 20722

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20722&view=rev
Log:
Fix bug #7872: Centering [image]s in story screens
Inroduce the new WML key centered=yes for this
"no" is the current default, to avoid breaking UMC and mainline stuff
but later we can proabably use "yes".
Also killed the obsolete (not in wiki) key "flip"
Use imagepath function ~FL(horiz/vert) instead, cleaner and more powerfull.

Modified:
    trunk/src/intro.cpp

Modified: trunk/src/intro.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/intro.cpp?rev=20722&r1=20721&r2=20722&view=diff
==============================================================================
--- trunk/src/intro.cpp (original)
+++ trunk/src/intro.cpp Wed Sep 26 18:30:13 2007
@@ -206,14 +206,17 @@
                        surface img(image::get_image(image_name));
                        if(img.null()) continue;
 
-                       if ((**i)["flip"] == "yes")
-                               img.assign(image::reverse_image(img));
 
                        SDL_Rect image_rect;
                        image_rect.x = x + dstrect.x;
                        image_rect.y = y + dstrect.y;
                        image_rect.w = img->w;
                        image_rect.h = img->h;
+
+                       if ((**i)["centered"] == "yes"){
+                               image_rect.x -= image_rect.w/2;
+                               image_rect.y -= image_rect.h/2;
+                       }
 
                        
SDL_BlitSurface(img,NULL,video.getSurface(),&image_rect);
 




Related Messages


Powered by MHonArc, Updated Wed Sep 26 19:40:48 2007