diff options
Diffstat (limited to 'src/ui_atoms.c')
-rw-r--r-- | src/ui_atoms.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui_atoms.c b/src/ui_atoms.c index 4bfffc2..ce700d9 100644 --- a/src/ui_atoms.c +++ b/src/ui_atoms.c @@ -325,9 +325,9 @@ void UI_DrawString( int x, int y, const color_t color, int flags, const char *st } if( ( flags & UI_CENTER ) == UI_CENTER ) { - x -= strlen( string ) * 8 / 2; + x -= strlen( string ) * CHAR_WIDTH / 2; } else if( flags & UI_RIGHT ) { - x -= strlen( string ) * 8; + x -= strlen( string ) * CHAR_WIDTH; } R_DrawString( x, y, flags, MAX_STRING_CHARS, string, uis.fontHandle ); @@ -341,9 +341,9 @@ void UI_DrawChar( int x, int y, int flags, int ch ) { } void UI_StringDimensions( vrect_t *rc, int flags, const char *string ) { - rc->height = 8; - rc->width = 8 * strlen( string ); - + rc->height = CHAR_HEIGHT; + rc->width = CHAR_WIDTH * strlen( string ); + if( ( flags & UI_CENTER ) == UI_CENTER ) { rc->x -= rc->width / 2; } else if( flags & UI_RIGHT ) { |