I implemented "tabs" in the string handling, but it's not working right, so I made the statistics use spaces instead.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@157 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
gigaherz
2008-08-08 22:17:03 +00:00
parent a1f48fee94
commit 8731021466
3 changed files with 30 additions and 15 deletions

View File

@ -172,8 +172,9 @@ void RasterFont::printCenteredString(const char *s, double y, int screen_width,
printString(s, x, y, z);
}
void RasterFont::printStuff(const char *text, double x, double start_y, double z, int bbHeight)
void RasterFont::printStuff(const char *text, double start_x, double start_y, double z, int bbWidth, int bbHeight)
{
double x=start_x;
double y=start_y;
static char temp[1024];
@ -186,6 +187,7 @@ void RasterFont::printStuff(const char *text, double x, double start_y, double z
*t=0;
printString(temp,x,y,z);
y-=char_height * 2.0f / bbHeight;
x=start_x;
t=temp;
}
else if(*text=='\r')
@ -195,6 +197,19 @@ void RasterFont::printStuff(const char *text, double x, double start_y, double z
else if(*text=='\t')
{
//todo: add tabs every something like 4*char_width
*t=0;
int cpos = strlen(temp);
int newpos = cpos+4&(~3);
printString(temp,x,y,z);
x =start_x + (char_width*newpos) * 2.0f / bbWidth;
t=temp;
*(t++)=' ';
}
else