CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Philippe Plantier <[EMAIL PROTECTED]> 05/09/05 19:07:21
Modified files:
src : intro.cpp
Log message:
Fixed #13961, part II. Now the code manages to make the story text fit,
even if
it is too large.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/intro.cpp.diff?tr1=1.82&tr2=1.83&r1=text&r2=text
Patches:
Index: wesnoth/src/intro.cpp
diff -u wesnoth/src/intro.cpp:1.82 wesnoth/src/intro.cpp:1.83
--- wesnoth/src/intro.cpp:1.82 Sun Aug 21 19:07:08 2005
+++ wesnoth/src/intro.cpp Mon Sep 5 19:07:21 2005
@@ -1,4 +1,4 @@
-/* $Id: intro.cpp,v 1.82 2005/08/21 19:07:08 gruikya Exp $ */
+/* $Id: intro.cpp,v 1.83 2005/09/05 19:07:21 gruikya Exp $ */
/*
Copyright (C) 2003 by David White <[EMAIL PROTECTED]>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -228,6 +228,16 @@
utils::utf8_iterator itor(story);
bool skip = false, last_key = true;
+
+ const SDL_Rect total_size = font::draw_text(NULL, screen_area(),
font::SIZE_PLUS,
+ font::NORMAL_COLOUR, story, 0, 0);
+ if (texty + total_size.h > screen_area().h) {
+ texty = screen_area().h > total_size.h + 1 ? screen_area().h -
total_size.h - 1 : 0;
+
+ draw_solid_tinted_rectangle(textx, texty, total_size.w,
total_size.h,
+ 0, 0, 0, 128, video.getSurface());
+ update_rect(textx, texty, total_size.w, total_size.h);
+ }
int xpos = textx, ypos = texty;