texteff.c
changeset 4609 954fe701062f
parent 4469 ce4562f4ec51
child 4912 0f51b47cb983
--- a/texteff.c	Sat Sep 16 13:02:35 2006 +0000
+++ b/texteff.c	Sat Sep 16 13:20:14 2006 +0000
@@ -70,7 +70,7 @@
 
 	/* Cut the message till it fits inside the chatbox */
 	length = strlen(buf);
-	while (GetStringWidth(buf) > _textmessage_width - 9) buf[--length] = '\0';
+	while (GetStringBoundingBox(buf).width > _textmessage_width - 9) buf[--length] = '\0';
 
 	/* Find an empty spot and put the message there */
 	for (i = 0; i < MAX_CHAT_MESSAGES; i++) {
@@ -247,7 +247,7 @@
 	te->params_2 = GetDParam(4);
 
 	GetString(buffer, msg);
-	w = GetStringWidth(buffer);
+	w = GetStringBoundingBox(buffer).width;
 
 	te->x = x - (w >> 1);
 	te->right = x + (w >> 1) - 1;