aboutsummaryrefslogtreecommitdiff
path: root/gui/newgui.cpp
diff options
context:
space:
mode:
authorMax Horn2003-05-05 16:10:19 +0000
committerMax Horn2003-05-05 16:10:19 +0000
commit898387e1ac906af80f7ee459306e75743c37a75a (patch)
tree1a058e3ed840e534e4815fd3fefbc9b1dde49015 /gui/newgui.cpp
parenta0c98d1f145c7e4b4d558673fc67b7635b94eacc (diff)
downloadscummvm-rg350-898387e1ac906af80f7ee459306e75743c37a75a.tar.gz
scummvm-rg350-898387e1ac906af80f7ee459306e75743c37a75a.tar.bz2
scummvm-rg350-898387e1ac906af80f7ee459306e75743c37a75a.zip
Patch #732707: EditTextWidget: long string support
svn-id: r7359
Diffstat (limited to 'gui/newgui.cpp')
-rw-r--r--gui/newgui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index 5eb7550c82..f1292d49bc 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -429,13 +429,14 @@ int NewGui::getCharWidth(byte c) {
return guifont[c+6];
}
-void NewGui::drawString(const String &str, int x, int y, int w, NewGuiColor color, int align) {
+void NewGui::drawString(const String &str, int x, int y, int w, NewGuiColor color, int align, int deltax) {
const int leftX = x, rightX = x + w;
int width = getStringWidth(str);
if (align == kTextAlignCenter)
x = x + (w - width - 1)/2;
else if (align == kTextAlignRight)
x = x + w - width;
+ x += deltax;
for (int i = 0; i < str.size(); ++i) {
w = getCharWidth(str[i]);