wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src multiplayer_lobby.cpp sdl_utils.cpp...


From: Philippe Plantier
Subject: [Wesnoth-cvs-commits] wesnoth/src multiplayer_lobby.cpp sdl_utils.cpp...
Date: Tue, 05 Oct 2004 17:57:43 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Philippe Plantier <address@hidden>      04/10/05 21:50:48

Modified files:
        src            : multiplayer_lobby.cpp sdl_utils.cpp 
                         sdl_utils.hpp 
        src/widgets    : menu.cpp 

Log message:
        Fixed bug #10414: long names in lobby going outside the reserved area.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_lobby.cpp.diff?tr1=1.37&tr2=1.38&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/sdl_utils.cpp.diff?tr1=1.57&tr2=1.58&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/sdl_utils.hpp.diff?tr1=1.43&tr2=1.44&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/menu.cpp.diff?tr1=1.62&tr2=1.63&r1=text&r2=text

Patches:
Index: wesnoth/src/multiplayer_lobby.cpp
diff -u wesnoth/src/multiplayer_lobby.cpp:1.37 
wesnoth/src/multiplayer_lobby.cpp:1.38
--- wesnoth/src/multiplayer_lobby.cpp:1.37      Sat Oct  2 20:58:35 2004
+++ wesnoth/src/multiplayer_lobby.cpp   Tue Oct  5 21:50:47 2004
@@ -215,6 +215,8 @@
                // Set GUI locations
                users_menu.set_loc(xscale(disp,869),yscale(disp,23));
                users_menu.set_width(xscale(disp,129));
+               users_menu.set_max_width(xscale(disp,129));
+
                
update_rect(xscale(disp,869),yscale(disp,23),xscale(disp,129),yscale(disp,725));
 
                if(dlg != NULL) {
Index: wesnoth/src/sdl_utils.cpp
diff -u wesnoth/src/sdl_utils.cpp:1.57 wesnoth/src/sdl_utils.cpp:1.58
--- wesnoth/src/sdl_utils.cpp:1.57      Fri Sep  3 21:42:00 2004
+++ wesnoth/src/sdl_utils.cpp   Tue Oct  5 21:50:48 2004
@@ -1,4 +1,4 @@
-/* $Id: sdl_utils.cpp,v 1.57 2004/09/03 21:42:00 silene Exp $ */
+/* $Id: sdl_utils.cpp,v 1.58 2004/10/05 21:50:48 gruikya Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -562,6 +562,7 @@
        return create_optimized_surface(nsurf);
 }
 
+
 surface create_compatible_surface(surface surf, int width, int height)
 {
        if(surf == NULL)
Index: wesnoth/src/sdl_utils.hpp
diff -u wesnoth/src/sdl_utils.hpp:1.43 wesnoth/src/sdl_utils.hpp:1.44
--- wesnoth/src/sdl_utils.hpp:1.43      Fri Sep  3 21:42:00 2004
+++ wesnoth/src/sdl_utils.hpp   Tue Oct  5 21:50:48 2004
@@ -1,4 +1,4 @@
-/* $Id: sdl_utils.hpp,v 1.43 2004/09/03 21:42:00 silene Exp $ */
+/* $Id: sdl_utils.hpp,v 1.44 2004/10/05 21:50:48 gruikya Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -110,8 +110,8 @@
 surface blend_surface(surface surface, double amount, Uint32 colour);
 surface flip_surface(surface surface);
 surface flop_surface(surface surface);
-
 surface create_compatible_surface(surface surf, int width=-1, int height=-1);
+surface blur_surface(surface surf);
 
 void fill_rect_alpha(SDL_Rect& rect, Uint32 colour, Uint8 alpha, surface 
target);
 
Index: wesnoth/src/widgets/menu.cpp
diff -u wesnoth/src/widgets/menu.cpp:1.62 wesnoth/src/widgets/menu.cpp:1.63
--- wesnoth/src/widgets/menu.cpp:1.62   Wed Sep 29 19:23:54 2004
+++ wesnoth/src/widgets/menu.cpp        Tue Oct  5 21:50:48 2004
@@ -570,6 +570,7 @@
                                         display_->video().getSurface());
 
        SDL_Rect area = display_->screen_area();
+       //SDL_Rect area = { 0, 0, rect.w, rect.h };
 
        const std::vector<int>& widths = column_widths();
 
@@ -595,8 +596,8 @@
                        } else {
                                const std::string to_show = max_width_ > -1 ? 
                                        font::make_text_ellipsis(str, 
menu_font_size,
-                                                                               
         max_width_ - (xpos - rect.x)
-                                                                               
         - scrollbar_.get_width()) : str;
+                                                                        
max_width_ - (xpos - rect.x)
+                                                                        - 
scrollbar_.get_width()) : str;
                                const SDL_Rect& text_size = 
font::text_area(str,menu_font_size);
                                const size_t y = rect.y + (rect.h - 
text_size.h)/2;
                                
font::draw_text(display_,area,menu_font_size,font::NORMAL_COLOUR,to_show,xpos,y);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]