translate drawtextvertical

This commit is contained in:
louis 2015-03-31 07:14:18 +02:00
parent 3d43200af0
commit a0f86bdc0d
3 changed files with 14 additions and 10 deletions

View File

@ -245,5 +245,6 @@ Version 0.3.3
height, posx or posy values are not parsed correctly height, posx or posy values are not parsed correctly
- fixed bug also for loops - fixed bug also for loops
- added possibility to draw vertical text bottomum and topdown - added possibility to draw vertical text bottomum and topdown
- translate drawtextvertical

View File

@ -188,7 +188,7 @@ void cTemplateFunction::SetTextboxHeight(int boxHeight) {
} }
void cTemplateFunction::SetTranslatedText(string translation) { void cTemplateFunction::SetTranslatedText(string translation) {
if (type != ftDrawText && type != ftDrawTextBox) if (type != ftDrawText && type != ftDrawTextBox && type != ftDrawTextVertical)
return; return;
if (translation.size() == 0) if (translation.size() == 0)
return; return;
@ -1454,6 +1454,9 @@ string cTemplateFunction::GetFuncName(void) {
case ftDrawTextBox: case ftDrawTextBox:
name = "Function DrawTextBox"; name = "Function DrawTextBox";
break; break;
case ftDrawTextVertical:
name = "Function DrawTextVertical";
break;
case ftDrawImage: case ftDrawImage:
name = "Function DrawImage"; name = "Function DrawImage";
break; break;

View File

@ -313,7 +313,7 @@ void cTemplateView::Translate(void) {
pix->InitIterator(); pix->InitIterator();
cTemplateFunction *func = NULL; cTemplateFunction *func = NULL;
while(func = pix->GetNextFunction()) { while(func = pix->GetNextFunction()) {
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox) { if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
string text = func->GetParameter(ptText); string text = func->GetParameter(ptText);
string translation; string translation;
bool translated = globals->Translate(text, translation); bool translated = globals->Translate(text, translation);
@ -326,7 +326,7 @@ void cTemplateView::Translate(void) {
funcsLoop->InitIterator(); funcsLoop->InitIterator();
cTemplateFunction *loopFunc = NULL; cTemplateFunction *loopFunc = NULL;
while(loopFunc = funcsLoop->GetNextFunction()) { while(loopFunc = funcsLoop->GetNextFunction()) {
if (loopFunc->GetType() == ftDrawText || loopFunc->GetType() == ftDrawTextBox) { if (loopFunc->GetType() == ftDrawText || loopFunc->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
string text = loopFunc->GetParameter(ptText); string text = loopFunc->GetParameter(ptText);
string translation; string translation;
bool translated = globals->Translate(text, translation); bool translated = globals->Translate(text, translation);
@ -349,7 +349,7 @@ void cTemplateView::Translate(void) {
pix->InitIterator(); pix->InitIterator();
cTemplateFunction *func = NULL; cTemplateFunction *func = NULL;
while(func = pix->GetNextFunction()) { while(func = pix->GetNextFunction()) {
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox) { if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
string text = func->GetParameter(ptText); string text = func->GetParameter(ptText);
string translation; string translation;
bool translated = globals->Translate(text, translation); bool translated = globals->Translate(text, translation);
@ -365,7 +365,7 @@ void cTemplateView::Translate(void) {
pix->InitIterator(); pix->InitIterator();
cTemplateFunction *func = NULL; cTemplateFunction *func = NULL;
while(func = pix->GetNextFunction()) { while(func = pix->GetNextFunction()) {
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox) { if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
string text = func->GetParameter(ptText); string text = func->GetParameter(ptText);
string translation; string translation;
bool translated = globals->Translate(text, translation); bool translated = globals->Translate(text, translation);
@ -383,7 +383,7 @@ void cTemplateView::Translate(void) {
pix->InitIterator(); pix->InitIterator();
cTemplateFunction *func = NULL; cTemplateFunction *func = NULL;
while(func = pix->GetNextFunction()) { while(func = pix->GetNextFunction()) {
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox) { if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
string text = func->GetParameter(ptText); string text = func->GetParameter(ptText);
string translation; string translation;
bool translated = globals->Translate(text, translation); bool translated = globals->Translate(text, translation);
@ -409,7 +409,7 @@ void cTemplateView::Translate(void) {
viewTab->InitIterator(); viewTab->InitIterator();
cTemplateFunction *func = NULL; cTemplateFunction *func = NULL;
while(func = viewTab->GetNextFunction()) { while(func = viewTab->GetNextFunction()) {
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox) { if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
string text = func->GetParameter(ptText); string text = func->GetParameter(ptText);
string translation; string translation;
translated = globals->Translate(text, translation); translated = globals->Translate(text, translation);
@ -422,7 +422,7 @@ void cTemplateView::Translate(void) {
funcsLoop->InitIterator(); funcsLoop->InitIterator();
cTemplateFunction *loopFunc = NULL; cTemplateFunction *loopFunc = NULL;
while(loopFunc = funcsLoop->GetNextFunction()) { while(loopFunc = funcsLoop->GetNextFunction()) {
if (loopFunc->GetType() == ftDrawText || loopFunc->GetType() == ftDrawTextBox) { if (loopFunc->GetType() == ftDrawText || loopFunc->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
string text = loopFunc->GetParameter(ptText); string text = loopFunc->GetParameter(ptText);
string translation; string translation;
bool translated = globals->Translate(text, translation); bool translated = globals->Translate(text, translation);
@ -445,7 +445,7 @@ void cTemplateView::Translate(void) {
pix->InitIterator(); pix->InitIterator();
cTemplateFunction *func = NULL; cTemplateFunction *func = NULL;
while(func = pix->GetNextFunction()) { while(func = pix->GetNextFunction()) {
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox) { if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
string text = func->GetParameter(ptText); string text = func->GetParameter(ptText);
string translation; string translation;
bool translated = globals->Translate(text, translation); bool translated = globals->Translate(text, translation);
@ -458,7 +458,7 @@ void cTemplateView::Translate(void) {
funcsLoop->InitIterator(); funcsLoop->InitIterator();
cTemplateFunction *loopFunc = NULL; cTemplateFunction *loopFunc = NULL;
while(loopFunc = funcsLoop->GetNextFunction()) { while(loopFunc = funcsLoop->GetNextFunction()) {
if (loopFunc->GetType() == ftDrawText || loopFunc->GetType() == ftDrawTextBox) { if (loopFunc->GetType() == ftDrawText || loopFunc->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
string text = loopFunc->GetParameter(ptText); string text = loopFunc->GetParameter(ptText);
string translation; string translation;
bool translated = globals->Translate(text, translation); bool translated = globals->Translate(text, translation);