Fix code formating

This commit is contained in:
BeaR 2014-06-11 16:37:38 +02:00
parent 04ee8b20a1
commit f3ca2403fd
2 changed files with 7 additions and 4 deletions

View file

@ -390,16 +390,19 @@ void CUI::DoLabel(const CUIRect *r, const char *pText, float Size, EAlignment Al
case ALIGN_CENTER:
{
float tw = TextRender()->TextWidth(0, Size, pText, MaxWidth);
TextRender()->Text(0, r->x + r->w/2-tw/2, r->y - Size/10, Size, pText, MaxWidth); break;
TextRender()->Text(0, r->x + r->w/2-tw/2, r->y - Size/10, Size, pText, MaxWidth);
break;
}
case ALIGN_LEFT:
{
TextRender()->Text(0, r->x, r->y - Size/10, Size, pText, MaxWidth); break;
TextRender()->Text(0, r->x, r->y - Size/10, Size, pText, MaxWidth);
break;
}
case ALIGN_RIGHT:
{
float tw = TextRender()->TextWidth(0, Size, pText, MaxWidth);
TextRender()->Text(0, r->x + r->w-tw, r->y - Size/10, Size, pText, MaxWidth); break;
TextRender()->Text(0, r->x + r->w-tw, r->y - Size/10, Size, pText, MaxWidth);
break;
}
}
}

View file

@ -75,7 +75,7 @@ public:
{
ALIGN_LEFT,
ALIGN_CENTER,
ALIGN_RIGHT
ALIGN_RIGHT,
};
int Update(float mx, float my, float Mwx, float Mwy, int m_Buttons);