diff -u --rec -N --exclude=CVS --exclude=.deps --exclude=*.o scummvm.old/gui/newgui.cpp scummvm/gui/newgui.cpp
old
|
new
|
|
358 | 358 | } |
359 | 359 | |
360 | 360 | int NewGui::getStringWidth(const String &str) { |
361 | | int width = 0; |
362 | | for (uint p = 0; p < str.size(); p++) |
363 | | width += getCharWidth(str[p]); |
364 | | return width; |
| 361 | return getFont().getStringWidth(str); |
365 | 362 | } |
366 | 363 | |
367 | 364 | int NewGui::getCharWidth(byte c) { |
368 | | return getFont().getCharWidth(c) * c != ' ' ? _scaleFactorWidth : 1; |
| 365 | return getFont().getCharWidth(c); |
369 | 366 | } |
370 | 367 | |
371 | 368 | void NewGui::drawString(const String &s, int x, int y, int w, OverlayColor color, TextAlignment align, int deltax, bool useEllipsis) { |