[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src/widgets button.cpp
From: |
Philippe Plantier |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src/widgets button.cpp |
Date: |
Sat, 30 Oct 2004 07:37:50 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Philippe Plantier <address@hidden> 04/10/30 11:24:28
Modified files:
src/widgets : button.cpp
Log message:
Making an ellipsis on the button text when it does not fit on the
button.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/button.cpp.diff?tr1=1.43&tr2=1.44&r1=text&r2=text
Patches:
Index: wesnoth/src/widgets/button.cpp
diff -u wesnoth/src/widgets/button.cpp:1.43 wesnoth/src/widgets/button.cpp:1.44
--- wesnoth/src/widgets/button.cpp:1.43 Fri Oct 22 00:09:07 2004
+++ wesnoth/src/widgets/button.cpp Sat Oct 30 11:24:27 2004
@@ -1,4 +1,4 @@
-/* $Id: button.cpp,v 1.43 2004/10/22 00:09:07 ydirson Exp $ */
+/* $Id: button.cpp,v 1.44 2004/10/30 11:24:27 gruikya Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -168,8 +168,9 @@
}
display_->blit_surface(location().x,location().y,image);
+ const std::string etext = font::make_text_ellipsis(label_, font_size,
width());
font::draw_text(display_,clipArea,font_size,
- font::BUTTON_COLOUR,label_,textx,texty);
+ font::BUTTON_COLOUR,etext,textx,texty);
update_rect(location());
@@ -199,8 +200,9 @@
}
textRect_ = display_->screen_area();
+ const std::string etext = font::make_text_ellipsis(label_, font_size,
width());
textRect_ = font::draw_text(NULL,textRect_,font_size,
- font::BUTTON_COLOUR,label_,0,0);
+ font::BUTTON_COLOUR,etext,0,0);
set_dirty(true);
}