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

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

[Wesnoth-cvs-commits] wesnoth/src about.cpp dialogs.cpp display.cpp f...


From: Yann Dirson
Subject: [Wesnoth-cvs-commits] wesnoth/src about.cpp dialogs.cpp display.cpp f...
Date: Sat, 25 Sep 2004 15:53:19 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Yann Dirson <address@hidden>    04/09/25 19:46:33

Modified files:
        src            : about.cpp dialogs.cpp display.cpp font.hpp 
                         intro.cpp mapgen_dialog.cpp multiplayer.cpp 

Log message:
        more fontsize names, more source files converted, -DUSE_TINY_GUI can be 
used to test with smaller fonts

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/about.cpp.diff?tr1=1.73&tr2=1.74&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/dialogs.cpp.diff?tr1=1.57&tr2=1.58&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/display.cpp.diff?tr1=1.261&tr2=1.262&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/font.hpp.diff?tr1=1.41&tr2=1.42&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/intro.cpp.diff?tr1=1.59&tr2=1.60&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/mapgen_dialog.cpp.diff?tr1=1.24&tr2=1.25&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer.cpp.diff?tr1=1.119&tr2=1.120&r1=text&r2=text

Patches:
Index: wesnoth/src/about.cpp
diff -u wesnoth/src/about.cpp:1.73 wesnoth/src/about.cpp:1.74
--- wesnoth/src/about.cpp:1.73  Mon Sep 20 13:01:14 2004
+++ wesnoth/src/about.cpp       Sat Sep 25 19:46:33 2004
@@ -1,4 +1,4 @@
-/* $Id: about.cpp,v 1.73 2004/09/20 13:01:14 ettin Exp $ */
+/* $Id: about.cpp,v 1.74 2004/09/25 19:46:33 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -312,7 +312,7 @@
                int cur_line = 0;
 
                do {
-                       SDL_Rect tr = 
font::draw_text(&disp,disp.screen_area(),24,font::BLACK_COLOUR,
+                       SDL_Rect tr = 
font::draw_text(&disp,disp.screen_area(),font::SIZE_XLARGE,font::BLACK_COLOUR,
                                                      text[line], map_rect.x + 
map_rect.w / 8,y);
                        if(is_new_line) {
                                is_new_line = false;
Index: wesnoth/src/dialogs.cpp
diff -u wesnoth/src/dialogs.cpp:1.57 wesnoth/src/dialogs.cpp:1.58
--- wesnoth/src/dialogs.cpp:1.57        Thu Sep 23 12:54:54 2004
+++ wesnoth/src/dialogs.cpp     Sat Sep 25 19:46:33 2004
@@ -1,4 +1,4 @@
-/* $Id: dialogs.cpp,v 1.57 2004/09/23 12:54:54 cedricd Exp $ */
+/* $Id: dialogs.cpp,v 1.58 2004/09/25 19:46:33 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -384,7 +384,7 @@
                str << "\n" << _("Difficulty") << ": " << 
string_table[summary["difficulty"]];
        }
 
-       
font::draw_text(&disp(),area,12,font::NORMAL_COLOUR,str.str(),area.x,ypos,NULL,true);
+       
font::draw_text(&disp(),area,font::SIZE_SMALL,font::NORMAL_COLOUR,str.str(),area.x,ypos,NULL,true);
 }
 
 } //end anon namespace
@@ -637,8 +637,8 @@
                std::stringstream desc;
                desc << font::NORMAL_TEXT << u.description();
                const std::string description = desc.str();
-               description_rect = font::text_area(description,14);
-               description_rect = 
font::draw_text(&disp(),area,14,font::NORMAL_COLOUR,desc.str(),right_align ? 
image_rect.x : image_rect.x + image_rect.w - 
description_rect.w,image_rect.y+image_rect.h+details_button_.location().h);
+               description_rect = 
font::text_area(description,font::SIZE_NORMAL);
+               description_rect = 
font::draw_text(&disp(),area,font::SIZE_NORMAL,font::NORMAL_COLOUR,desc.str(),right_align
 ? image_rect.x : image_rect.x + image_rect.w - 
description_rect.w,image_rect.y+image_rect.h+details_button_.location().h);
        }
 
        std::stringstream details;
@@ -716,11 +716,11 @@
        for(std::vector<std::string>::const_iterator line = lines.begin(); line 
!= lines.end(); ++line) {
                int xpos = cur_area.x;
                if(right_align && !weapons_) {
-                       const SDL_Rect& line_area = font::text_area(*line,12);
+                       const SDL_Rect& line_area = 
font::text_area(*line,font::SIZE_SMALL);
                        xpos = cur_area.x + cur_area.w - line_area.w;
                }
 
-               cur_area = 
font::draw_text(&disp(),location(),12,font::NORMAL_COLOUR,*line,xpos,cur_area.y);
+               cur_area = 
font::draw_text(&disp(),location(),font::SIZE_SMALL,font::NORMAL_COLOUR,*line,xpos,cur_area.y);
                cur_area.y += cur_area.h;
        }
 }
@@ -787,12 +787,12 @@
        gui::draw_dialog_frame(area.x,area.y,area.w,area.h,disp(),style);
 
        /* description text */
-       const std::string& desc_text = 
font::word_wrap_text((*descriptions_)[index_].first,12,area.w-2*campaign_preview_border);
+       const std::string& desc_text = 
font::word_wrap_text((*descriptions_)[index_].first,font::SIZE_SMALL,area.w-2*campaign_preview_border);
        const std::vector<std::string> lines = config::split(desc_text,'\n');
        SDL_Rect txt_area = { area.x+campaign_preview_border,area.y,0,0 };
 
        for(std::vector<std::string>::const_iterator line = lines.begin(); line 
!= lines.end(); ++line) {
-               txt_area = 
font::draw_text(&disp(),location(),12,font::NORMAL_COLOUR,*line,txt_area.x,txt_area.y);
+               txt_area = 
font::draw_text(&disp(),location(),font::SIZE_SMALL,font::NORMAL_COLOUR,*line,txt_area.x,txt_area.y);
                txt_area.y += txt_area.h;
        }
 
Index: wesnoth/src/display.cpp
diff -u wesnoth/src/display.cpp:1.261 wesnoth/src/display.cpp:1.262
--- wesnoth/src/display.cpp:1.261       Mon Sep 13 18:48:07 2004
+++ wesnoth/src/display.cpp     Sat Sep 25 19:46:33 2004
@@ -1,4 +1,4 @@
-/* $Id: display.cpp,v 1.261 2004/09/13 18:48:07 gruikya Exp $ */
+/* $Id: display.cpp,v 1.262 2004/09/25 19:46:33 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -1539,20 +1539,20 @@
                const SDL_Rect& rect = map_area();
                std::string str(1,'x');
                str[0] = '1' + route_.move_left;
-               const SDL_Rect& text_area = font::text_area(str,18);
+               const SDL_Rect& text_area = 
font::text_area(str,font::SIZE_LARGE);
                const int x = xloc + zoom_/2 - text_area.w/2;
                const int y = yloc + zoom_/2 - text_area.h/2;
 
                //draw the text with a black outline
-               font::draw_text(this,rect,18,font::DARK_COLOUR,str,x-1,y-1);
-               font::draw_text(this,rect,18,font::DARK_COLOUR,str,x-1,y);
-               font::draw_text(this,rect,18,font::DARK_COLOUR,str,x-1,y+1);
-               font::draw_text(this,rect,18,font::DARK_COLOUR,str,x,y-1);
-               font::draw_text(this,rect,18,font::DARK_COLOUR,str,x+1,y-1);
-               font::draw_text(this,rect,18,font::DARK_COLOUR,str,x+1,y);
-               font::draw_text(this,rect,18,font::DARK_COLOUR,str,x+1,y+1);
-               font::draw_text(this,rect,18,font::DARK_COLOUR,str,x,y+1);
-               font::draw_text(this,rect,18,font::YELLOW_COLOUR,str,x,y);
+               
font::draw_text(this,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x-1,y-1);
+               
font::draw_text(this,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x-1,y);
+               
font::draw_text(this,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x-1,y+1);
+               
font::draw_text(this,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x,y-1);
+               
font::draw_text(this,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x+1,y-1);
+               
font::draw_text(this,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x+1,y);
+               
font::draw_text(this,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x+1,y+1);
+               
font::draw_text(this,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x,y+1);
+               
font::draw_text(this,rect,font::SIZE_LARGE,font::YELLOW_COLOUR,str,x,y);
        }
 }
 
@@ -1824,7 +1824,7 @@
        }
 
        const SDL_Color colour = {red,green,blue,255};
-       
font::add_floating_label(text,24,colour,get_location_x(loc)+zoom_/2,get_location_y(loc),
+       
font::add_floating_label(text,font::SIZE_XLARGE,colour,get_location_x(loc)+zoom_/2,get_location_y(loc),
                                 
0,-2,60,screen_area(),font::CENTER_ALIGN,NULL,0,font::ANCHOR_LABEL_MAP);
 }
 
@@ -2139,7 +2139,7 @@
        font::remove_floating_label(help_string_);
 
        const SDL_Color colour = {0x0,0x00,0x00,0x77};
-       help_string_ = 
font::add_floating_label(str,18,font::NORMAL_COLOUR,x()/2,y(),0.0,0.0,-1,screen_area(),font::CENTER_ALIGN,&colour,5);
+       help_string_ = 
font::add_floating_label(str,font::SIZE_LARGE,font::NORMAL_COLOUR,x()/2,y(),0.0,0.0,-1,screen_area(),font::CENTER_ALIGN,&colour,5);
        const SDL_Rect& rect = font::get_floating_label_rect(help_string_);
        font::move_floating_label(help_string_,0.0,-double(rect.h));
        return help_string_;
@@ -2221,11 +2221,11 @@
        }
 
        const SDL_Rect rect = map_area();
-       const int speaker_handle = 
font::add_floating_label(str.str(),12,speaker_colour,
+       const int speaker_handle = 
font::add_floating_label(str.str(),font::SIZE_SMALL,speaker_colour,
                                                           
rect.x+chat_message_x,rect.y+ypos,
                                                                                
                           
0,0,-1,rect,font::LEFT_ALIGN,&chat_message_bg,chat_message_border);
 
-       const int message_handle = 
font::add_floating_label(message_str.str(),12,chat_message_colour,
+       const int message_handle = 
font::add_floating_label(message_str.str(),font::SIZE_SMALL,chat_message_colour,
                rect.x + chat_message_x + 
font::get_floating_label_rect(speaker_handle).w,rect.y+ypos,
                
0,0,-1,rect,font::LEFT_ALIGN,&chat_message_bg,chat_message_border);
 
@@ -2266,7 +2266,7 @@
        }
 
        if(msg != "") {
-               diagnostic_label_ = 
font::add_floating_label(msg,16,font::YELLOW_COLOUR,300.0,50.0,0.0,0.0,-1,map_area());
+               diagnostic_label_ = 
font::add_floating_label(msg,font::SIZE_PLUS,font::YELLOW_COLOUR,300.0,50.0,0.0,0.0,-1,map_area());
        }
 }
 
Index: wesnoth/src/font.hpp
diff -u wesnoth/src/font.hpp:1.41 wesnoth/src/font.hpp:1.42
--- wesnoth/src/font.hpp:1.41   Fri Sep 24 23:25:09 2004
+++ wesnoth/src/font.hpp        Sat Sep 25 19:46:33 2004
@@ -1,4 +1,4 @@
-/* $Id: font.hpp,v 1.41 2004/09/24 23:25:09 ydirson Exp $ */
+/* $Id: font.hpp,v 1.42 2004/09/25 19:46:33 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -43,11 +43,25 @@
 extern const char LARGE_TEXT, SMALL_TEXT, GOOD_TEXT, BAD_TEXT, NORMAL_TEXT, 
BLACK_TEXT, BOLD_TEXT, IMAGE, NULL_MARKUP;
 
 // font sizes, probably to make theme parameters
+#ifndef USE_TINY_GUI
 const int SIZE_NORMAL = 14,
   SIZE_TINY = 10,
-  SIZE_SMALL = 12
+  SIZE_SMALL = 12,
+
+  SIZE_PLUS = 16,
+  SIZE_LARGE = 18,
+  SIZE_XLARGE = 24
+  ;  
+#else
+const int SIZE_NORMAL = 10,
+  SIZE_TINY = 6,
+  SIZE_SMALL = 8,
+
+  SIZE_PLUS = 12,
+  SIZE_LARGE = 14,
+  SIZE_XLARGE = 20
   ;  
-    
+#endif
 //function to draw text on the screen. The text will be clipped to area.
 //If the text runs outside of area horizontally, an ellipsis will be displayed
 //at the end of it. If use_tooltips is true, then text with an ellipsis will
Index: wesnoth/src/intro.cpp
diff -u wesnoth/src/intro.cpp:1.59 wesnoth/src/intro.cpp:1.60
--- wesnoth/src/intro.cpp:1.59  Sat Aug 28 23:00:13 2004
+++ wesnoth/src/intro.cpp       Sat Sep 25 19:46:33 2004
@@ -1,4 +1,4 @@
-/* $Id: intro.cpp,v 1.59 2004/08/28 23:00:13 Sirp Exp $ */
+/* $Id: intro.cpp,v 1.60 2004/09/25 19:46:33 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -132,8 +132,8 @@
        if(show_title) {
                const SDL_Rect area = {0,0,screen.x(),screen.y()};
                const SDL_Rect scenario_size =
-                     
font::draw_text(NULL,area,24,font::NORMAL_COLOUR,scenario,0,0);
-                               
update_rect(font::draw_text(&screen,area,24,font::NORMAL_COLOUR,scenario,
+                     
font::draw_text(NULL,area,font::SIZE_XLARGE,font::NORMAL_COLOUR,scenario,0,0);
+                               
update_rect(font::draw_text(&screen,area,font::SIZE_XLARGE,font::NORMAL_COLOUR,scenario,
                                dstrect.x,dstrect.y - scenario_size.h - 4));
        }
 
@@ -238,7 +238,7 @@
                                        word += *k;
                                }
                                const SDL_Rect rect = 
font::draw_text(NULL,screen.screen_area(),
-                                               16,font::NORMAL_COLOUR,
+                                               
font::SIZE_PLUS,font::NORMAL_COLOUR,
                                                word,xpos,ypos,NULL,
                                                false,font::NO_MARKUP);
 
@@ -252,7 +252,7 @@
 
                        // output the character
                        const SDL_Rect rect = font::draw_text(&screen,
-                                       screen.screen_area(),16,
+                                       screen.screen_area(),font::SIZE_PLUS,
                                        font::NORMAL_COLOUR,*j,xpos,ypos,
                                        NULL,false,font::NO_MARKUP);
 
@@ -310,7 +310,7 @@
        screen.video().flip();
 
        const std::string text = _("The End");
-       const size_t font_size = 24;
+       const size_t font_size = font::SIZE_XLARGE;
        
        area = font::text_area(text,font_size);
        area.x = screen.screen_area().w/2 - area.w/2;
Index: wesnoth/src/mapgen_dialog.cpp
diff -u wesnoth/src/mapgen_dialog.cpp:1.24 wesnoth/src/mapgen_dialog.cpp:1.25
--- wesnoth/src/mapgen_dialog.cpp:1.24  Wed Aug 25 02:59:51 2004
+++ wesnoth/src/mapgen_dialog.cpp       Sat Sep 25 19:46:33 2004
@@ -82,13 +82,13 @@
        const std::string& villages_label = _("Villages") + std::string(":");
        const std::string& landform_label = _("Landform") + std::string(":");
 
-       SDL_Rect players_rect = 
font::draw_text(NULL,disp.screen_area(),14,font::NORMAL_COLOUR,players_label,0,0);
-       SDL_Rect width_rect = 
font::draw_text(NULL,disp.screen_area(),14,font::NORMAL_COLOUR,width_label,0,0);
-       SDL_Rect height_rect = 
font::draw_text(NULL,disp.screen_area(),14,font::NORMAL_COLOUR,height_label,0,0);
-       SDL_Rect iterations_rect = 
font::draw_text(NULL,disp.screen_area(),14,font::NORMAL_COLOUR,iterations_label,0,0);
-       SDL_Rect hillsize_rect = 
font::draw_text(NULL,disp.screen_area(),14,font::NORMAL_COLOUR,hillsize_label,0,0);
-       SDL_Rect villages_rect = 
font::draw_text(NULL,disp.screen_area(),14,font::NORMAL_COLOUR,villages_label,0,0);
-       SDL_Rect landform_rect = 
font::draw_text(NULL,disp.screen_area(),14,font::NORMAL_COLOUR,landform_label,0,0);
+       SDL_Rect players_rect = 
font::draw_text(NULL,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,players_label,0,0);
+       SDL_Rect width_rect = 
font::draw_text(NULL,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,width_label,0,0);
+       SDL_Rect height_rect = 
font::draw_text(NULL,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,height_label,0,0);
+       SDL_Rect iterations_rect = 
font::draw_text(NULL,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,iterations_label,0,0);
+       SDL_Rect hillsize_rect = 
font::draw_text(NULL,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,hillsize_label,0,0);
+       SDL_Rect villages_rect = 
font::draw_text(NULL,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,villages_label,0,0);
+       SDL_Rect landform_rect = 
font::draw_text(NULL,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,landform_label,0,0);
 
        const int horz_margin = 5;
        const int text_right = xpos + horz_margin +
@@ -218,37 +218,37 @@
                events::raise_process_event();
                events::raise_draw_event();
 
-               
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,players_label,players_rect.x,players_rect.y);
-               
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,width_label,width_rect.x,width_rect.y);
-               
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,height_label,height_rect.x,height_rect.y);
-               
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,iterations_label,iterations_rect.x,iterations_rect.y);
-               
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,hillsize_label,hillsize_rect.x,hillsize_rect.y);
-               
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,villages_label,villages_rect.x,villages_rect.y);
-               
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,landform_label,landform_rect.x,landform_rect.y);
+               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,players_label,players_rect.x,players_rect.y);
+               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,width_label,width_rect.x,width_rect.y);
+               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,height_label,height_rect.x,height_rect.y);
+               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,iterations_label,iterations_rect.x,iterations_rect.y);
+               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,hillsize_label,hillsize_rect.x,hillsize_rect.y);
+               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,villages_label,villages_rect.x,villages_rect.y);
+               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,landform_label,landform_rect.x,landform_rect.y);
 
                std::stringstream players_str;
                players_str << nplayers_;
-               
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,players_str.str(),
+               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,players_str.str(),
                                slider_right+horz_margin,players_rect.y);
 
                std::stringstream width_str;
                width_str << width_;
-               
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,width_str.str(),
+               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,width_str.str(),
                                slider_right+horz_margin,width_rect.y);
 
                std::stringstream height_str;
                height_str << height_;
-               
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,height_str.str(),
+               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,height_str.str(),
                                slider_right+horz_margin,height_rect.y);
                
                std::stringstream villages_str;
                villages_str << nvillages_ << _("/1000 tiles");
-               
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,villages_str.str(),
+               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,villages_str.str(),
                                slider_right+horz_margin,villages_rect.y);
 
                std::stringstream landform_str;
                landform_str << gettext(island_size_ == 0 ? N_("Inland") : 
(island_size_ < max_coastal ? N_("Coastal") : N_("Island")));
-               
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,landform_str.str(),
+               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,landform_str.str(),
                                    slider_right+horz_margin,landform_rect.y);
 
                update_rect(xpos,ypos,width,height);
Index: wesnoth/src/multiplayer.cpp
diff -u wesnoth/src/multiplayer.cpp:1.119 wesnoth/src/multiplayer.cpp:1.120
--- wesnoth/src/multiplayer.cpp:1.119   Mon Sep 13 03:16:19 2004
+++ wesnoth/src/multiplayer.cpp Sat Sep 25 19:46:33 2004
@@ -1,4 +1,4 @@
-/* $Id: multiplayer.cpp,v 1.119 2004/09/13 03:16:19 Sirp Exp $ */
+/* $Id: multiplayer.cpp,v 1.120 2004/09/25 19:46:33 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -173,7 +173,7 @@
        int ypos = top + gui::draw_dialog_title(left,top,&disp_,_("Create 
Game")).h + border_size;
 
        //Name Entry
-       ypos += font::draw_text(&disp_,disp_.screen_area(),12,font::GOOD_COLOUR,
+       ypos += 
font::draw_text(&disp_,disp_.screen_area(),font::SIZE_SMALL,font::GOOD_COLOUR,
                                _("Name of game") + 
std::string(":"),xpos,ypos).h + border_size;
        string_map i18n_symbols;
        i18n_symbols["login"] = preferences::login();
@@ -188,7 +188,7 @@
 
        //the map selection menu goes near the middle of the dialog, to the 
right of
        //the minimap
-       const int map_label_height = 
font::draw_text(&disp_,disp_.screen_area(),12,font::GOOD_COLOUR,
+       const int map_label_height = 
font::draw_text(&disp_,disp_.screen_area(),font::SIZE_SMALL,font::GOOD_COLOUR,
                                                     _("Map to play") + 
std::string(":"),xpos + minimap_width + border_size,ypos).h;
 
        maps_menu_->set_loc(xpos + minimap_width + border_size,ypos + 
map_label_height + border_size);
@@ -201,7 +201,7 @@
        rect.y = ypos;
        rect.w = maximum<int>(0,right - border_size - rect.x);
        //a font sized "12" isn't necessarily 12 pixel high.
-       rect.h = font::get_max_height(12);
+       rect.h = font::get_max_height(font::SIZE_SMALL);
 
        turns_restorer_ = surface_restorer(&disp_.video(),rect);
 
@@ -286,7 +286,7 @@
        playernum_restorer_ = surface_restorer(&disp_.video(),player_num_rect);
 
        SDL_Rect era_rect = {xpos,player_num_rect.y+player_num_rect.h + 
border_size,50,20};
-       era_rect = 
font::draw_text(&disp_,era_rect,12,font::GOOD_COLOUR,_("Era") + 
std::string(":"),
+       era_rect = 
font::draw_text(&disp_,era_rect,font::SIZE_SMALL,font::GOOD_COLOUR,_("Era") + 
std::string(":"),
                                   era_rect.x,era_rect.y);
        
        era_combo_->set_location(era_rect.x+era_rect.w+border_size,era_rect.y);
@@ -351,7 +351,7 @@
                turns_str = _("Unlimited");
        }
 
-       font::draw_text(&disp_,disp_.screen_area(),12,font::GOOD_COLOUR,
+       
font::draw_text(&disp_,disp_.screen_area(),font::SIZE_SMALL,font::GOOD_COLOUR,
                        _("Turns") + std::string(": ") + turns_str,
                                        
turns_restorer_.area().x,turns_restorer_.area().y);
 
@@ -359,7 +359,7 @@
        const int village_gold = village_gold_slider_->value();
        village_gold_restorer_.restore();
        sprintf(buf,": %d", village_gold);
-       font::draw_text(&disp_,disp_.screen_area(),12,font::GOOD_COLOUR,
+       
font::draw_text(&disp_,disp_.screen_area(),font::SIZE_SMALL,font::GOOD_COLOUR,
                        _("Village Gold") + std::string(buf),
                                        
village_gold_restorer_.area().x,village_gold_restorer_.area().y);
 
@@ -371,7 +371,7 @@
        sprintf(buf,": %d%%", xpmod);
 
        const SDL_Rect& xp_rect = xp_restorer_.area();
-       font::draw_text(&disp_,disp_.screen_area(),12,font::GOOD_COLOUR,
+       
font::draw_text(&disp_,disp_.screen_area(),font::SIZE_SMALL,font::GOOD_COLOUR,
                        _("Experience Requirements") + 
std::string(buf),xp_rect.x,xp_rect.y);
 
        bool map_changed = map_selection_ != maps_menu_->selection();
@@ -416,7 +416,7 @@
                        playernum_restorer_.restore();
                        minimap_restorer_.restore();
                        const SDL_Rect& player_num_rect = 
playernum_restorer_.area();
-                       
font::draw_text(&disp_,disp_.screen_area(),12,font::GOOD_COLOUR,
+                       
font::draw_text(&disp_,disp_.screen_area(),font::SIZE_SMALL,font::GOOD_COLOUR,
                                                " Load Map 
",player_num_rect.x,player_num_rect.y);
                }
        }
@@ -482,7 +482,7 @@
 
                        std::stringstream players;
                        players << _("Players") << ": " << nsides;
-                       
font::draw_text(&disp_,disp_.screen_area(),12,font::GOOD_COLOUR,
+                       
font::draw_text(&disp_,disp_.screen_area(),font::SIZE_SMALL,font::GOOD_COLOUR,
                                        
players.str(),players_rect.x,players_rect.y);
                }
        }




reply via email to

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