changeset 32791:ece4313fbf15

Use defined variable and do not recalculate again.
author ib
date Thu, 10 Feb 2011 13:26:18 +0000
parents 5c23e57bb0a4
children 31ce0bd110d5
files gui/skin/font.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gui/skin/font.c	Thu Feb 10 13:24:00 2011 +0000
+++ b/gui/skin/font.c	Thu Feb 10 13:26:18 2011 +0000
@@ -259,8 +259,8 @@
     {
      default:
      case fntAlignLeft:   dx=0; break;
-     case fntAlignCenter: dx=( iw - fntTextWidth( id,txt ) ) / 2; break;
-     case fntAlignRight:  dx=iw - fntTextWidth( id,txt ); break;
+     case fntAlignCenter: dx=( iw - tw ) / 2; break;
+     case fntAlignRight:  dx=iw - tw; break;
     }
 
   } else dx+=px;