mirror of
https://github.com/glest/glest-source.git
synced 2025-08-22 16:02:50 +02:00
corrected font alingment when using combination of newline and tabs
This commit is contained in:
@@ -141,7 +141,9 @@ string MenuStateAbout::loadAdditionalCredits(){
|
|||||||
endPathWithSlash(data_path);
|
endPathWithSlash(data_path);
|
||||||
}
|
}
|
||||||
string result= "";
|
string result= "";
|
||||||
const string dir= data_path + "data/core/menu/credits.txt";
|
const string dir= getGameCustomCoreDataPath(data_path,"data/core/menu/credits.txt");
|
||||||
|
//printf("dir [%s]\n",dir.c_str());
|
||||||
|
|
||||||
if(fileExists(dir) == true) {
|
if(fileExists(dir) == true) {
|
||||||
#if defined(WIN32) && !defined(__MINGW32__)
|
#if defined(WIN32) && !defined(__MINGW32__)
|
||||||
FILE *fp = _wfopen(utf8_decode(dir).c_str(), L"r");
|
FILE *fp = _wfopen(utf8_decode(dir).c_str(), L"r");
|
||||||
|
@@ -539,6 +539,7 @@ void TextRenderer3DGl::internalRender(const string &text, float x, float y, boo
|
|||||||
//glTranslatef(translatePos.x + scaleWidthX, translatePos.y, translatePos.z);
|
//glTranslatef(translatePos.x + scaleWidthX, translatePos.y, translatePos.z);
|
||||||
glTranslatef(translatePos.x, translatePos.y, translatePos.z);
|
glTranslatef(translatePos.x, translatePos.y, translatePos.z);
|
||||||
|
|
||||||
|
Vec3f translatePosOriginal = translatePos;;
|
||||||
//assertGl();
|
//assertGl();
|
||||||
|
|
||||||
//glScalef(scaleX, scaleY, scaleZ);
|
//glScalef(scaleX, scaleY, scaleZ);
|
||||||
@@ -611,7 +612,7 @@ void TextRenderer3DGl::internalRender(const string &text, float x, float y, boo
|
|||||||
|
|
||||||
//printf("Trying to render newline [%s] i = %d yLineValue = %f font->getTextHandler()->LineHeight(parts[i].c_str()) = %f\n",renderText.c_str(),i,yLineValue,font->getTextHandler()->LineHeight(parts[i].c_str()));
|
//printf("Trying to render newline [%s] i = %d yLineValue = %f font->getTextHandler()->LineHeight(parts[i].c_str()) = %f\n",renderText.c_str(),i,yLineValue,font->getTextHandler()->LineHeight(parts[i].c_str()));
|
||||||
|
|
||||||
translatePos= Vec3f(translatePos.x, translatePos.y - yLineValue, translatePos.z);
|
translatePos= Vec3f(translatePosOriginal.x, translatePos.y - yLineValue, translatePos.z);
|
||||||
needsRecursiveRender = true;
|
needsRecursiveRender = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user