From: <wrt...@us...> - 2008-02-16 14:34:59
|
Revision: 7955 http://armagetronad.svn.sourceforge.net/armagetronad/?rev=7955&view=rev Author: wrtlprnft Date: 2008-02-16 06:35:01 -0800 (Sat, 16 Feb 2008) Log Message: ----------- Fixed wrong scaling of menu item texts that have colors in them and are set to show color codes (like the chat input thing) Modified Paths: -------------- armagetronad/trunk/armagetronad/src/ui/uMenu.cpp Modified: armagetronad/trunk/armagetronad/src/ui/uMenu.cpp =================================================================== --- armagetronad/trunk/armagetronad/src/ui/uMenu.cpp 2008-02-16 14:18:24 UTC (rev 7954) +++ armagetronad/trunk/armagetronad/src/ui/uMenu.cpp 2008-02-16 14:35:01 UTC (rev 7955) @@ -557,13 +557,12 @@ REAL th = text_height; - REAL availw = 1.9f; if (center < 0) availw = (.9f-x); if (center > 0) availw = (x + .9f); if (availw > maxWidth) availw = maxWidth; - float usedwidth=rTextField::GetTextLength(tString(text), th, true); + float usedwidth=rTextField::GetTextLength(tString(text), th, colorMode == rTextField::COLOR_USE); if (usedwidth > availw) { th *= availw/(usedwidth); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |