This commit is contained in:
ardi@ist-einmalig.de 2009-05-05 18:17:59 +00:00
parent 7ed41e0491
commit 28c51cd5e8
3 changed files with 17 additions and 13 deletions

Binary file not shown.

View File

@ -29,7 +29,7 @@ GuiText::GuiText(const char * t, int s, GXColor c)
alpha = c.a; alpha = c.a;
style = FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE; style = FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE;
maxWidth = 0; maxWidth = 0;
font = 0; font = NULL;
alignmentHor = ALIGN_CENTRE; alignmentHor = ALIGN_CENTRE;
alignmentVert = ALIGN_MIDDLE; alignmentVert = ALIGN_MIDDLE;
@ -49,6 +49,7 @@ GuiText::GuiText(const char * t)
alpha = presetColor.a; alpha = presetColor.a;
style = presetStyle; style = presetStyle;
maxWidth = presetMaxWidth; maxWidth = presetMaxWidth;
font = NULL;
alignmentHor = presetAlignmentHor; alignmentHor = presetAlignmentHor;
alignmentVert = presetAlignmentVert; alignmentVert = presetAlignmentVert;
@ -168,8 +169,8 @@ void GuiText::Draw()
if(newSize != currentSize) if(newSize != currentSize)
{ {
fontSystem->changeSize(newSize); //fontSystem->changeSize(newSize);
//(font ? font : fontSystem)->changeSize(newSize); (font ? font : fontSystem)->changeSize(newSize);
currentSize = newSize; currentSize = newSize;
} }
@ -199,8 +200,8 @@ void GuiText::Draw()
if(text[ch] == ' ' || ch == strlen-1) if(text[ch] == ' ' || ch == strlen-1)
{ {
//if((font ? font : fontSystem)->getWidth(tmptext[linenum]) >= maxWidth) if((font ? font : fontSystem)->getWidth(tmptext[linenum]) >= maxWidth)
if(fontSystem->getWidth(tmptext[linenum]) >= maxWidth) //if(fontSystem->getWidth(tmptext[linenum]) >= maxWidth)
{ {
if(lastSpace >= 0) if(lastSpace >= 0)
{ {
@ -231,15 +232,15 @@ void GuiText::Draw()
for(i=0; i < linenum; i++) for(i=0; i < linenum; i++)
{ {
//(font ? font : fontSystem)->drawText(this->GetLeft(), this->GetTop()+voffset+i*lineheight, tmptext[i], c, style); (font ? font : fontSystem)->drawText(this->GetLeft(), this->GetTop()+voffset+i*lineheight, tmptext[i], c, style);
fontSystem->drawText(this->GetLeft(), this->GetTop()+voffset+i*lineheight, tmptext[i], c, style); //fontSystem->drawText(this->GetLeft(), this->GetTop()+voffset+i*lineheight, tmptext[i], c, style);
delete tmptext[i]; delete tmptext[i];
} }
} }
else else
{ {
//(font ? font : fontSystem)->drawText(this->GetLeft(), this->GetTop()+voffset, text, c, style); (font ? font : fontSystem)->drawText(this->GetLeft(), this->GetTop()+voffset, text, c, style);
fontSystem->drawText(this->GetLeft(), this->GetTop()+voffset, text, c, style); //fontSystem->drawText(this->GetLeft(), this->GetTop()+voffset, text, c, style);
} }
this->UpdateEffects(); this->UpdateEffects();
} }

View File

@ -1411,8 +1411,10 @@ ShowProgress (s32 done, s32 total)
sprintf(prozent, "%0.2f%%", percent); sprintf(prozent, "%0.2f%%", percent);
prTxt.SetText(prozent); prTxt.SetText(prozent);
prTxt.SetFont(fontClock);
sprintf(timet,"Time left: %d:%02d:%02d",h,m,s); sprintf(timet,"Time left: %d:%02d:%02d",h,m,s);
timeTxt.SetText(timet); timeTxt.SetText(timet);
// timeTxt.SetFont(fontClock);
progressbarImg.SetTile(100*progressDone/progressTotal); progressbarImg.SetTile(100*progressDone/progressTotal);
} }
@ -1609,6 +1611,7 @@ ProgressDownloadWindow(int choice2)
sprintf(prozent, "%i%%", 100*i/cntMissFiles); sprintf(prozent, "%i%%", 100*i/cntMissFiles);
prTxt.SetText(prozent); prTxt.SetText(prozent);
prTxt.SetFont(fontClock);
progressbarImg.SetTile(100*i/cntMissFiles); progressbarImg.SetTile(100*i/cntMissFiles);
sprintf(msg, "%i file(s) left", cntMissFiles - i); sprintf(msg, "%i file(s) left", cntMissFiles - i);