From: Johnathan G. <da...@us...> - 2002-07-14 07:16:43
|
daren 2002/07/14 00:16:41 PDT Modified files: phui/phui Button.cpp FontRenderer.cpp FontRenderer.h Log: Buttons now splice their text (by calling the new FontRenderer::draw) so that it fits inside the button instead of running out along the side. If the spliced text is too long to fit on multiple lines, well, it spills under the button :\ The FontRenderer has a second version of draw that takes a phui::Size object which is the constraint of the object to draw text to. This draw function will splcie the text value in order to meet the width constraints of the Size object. To see the results, look at the event example. Revision Changes Path 1.20 +4 -4 lib/phui/phui/Button.cpp 1.5 +40 -2 lib/phui/phui/FontRenderer.cpp 1.5 +13 -3 lib/phui/phui/FontRenderer.h http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/isugamedev/lib/phui/phui/Button.cpp.diff?r1=1.19&r2=1.20&diff_format=h http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/isugamedev/lib/phui/phui/FontRenderer.cpp.diff?r1=1.4&r2=1.5&diff_format=h http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/isugamedev/lib/phui/phui/FontRenderer.h.diff?r1=1.4&r2=1.5&diff_format=h |