use assignment operators (to my defense: the *x/*y were different on both
sides of the equal sign at some time ... :-)
This commit is contained in:
parent
4419aa2cb3
commit
cc10e1986f
1 changed files with 6 additions and 6 deletions
|
@ -457,18 +457,18 @@ void HUD::textAlign(fntRenderer *rend, const char *s, int align,
|
|||
font->getBBox(s, rend->getPointSize(), rend->getSlant(), &left, &right, &bot, &top);
|
||||
|
||||
if (align & HUD::HCENTER)
|
||||
*x = *x - left + gap - (right - left - gap) / 2.0;
|
||||
*x -= left - gap + (right - left - gap) / 2.0;
|
||||
else if (align & HUD::RIGHT)
|
||||
*x = *x - right;
|
||||
*x -= right;
|
||||
else if (align & HUD::LEFT)
|
||||
*x = *x - left;
|
||||
*x -= left;
|
||||
|
||||
if (align & HUD::VCENTER)
|
||||
*y = *y - bot - (top - bot) / 2.0;
|
||||
*y -= bot + (top - bot) / 2.0;
|
||||
else if (align & HUD::TOP)
|
||||
*y = *y - top;
|
||||
*y -= top;
|
||||
else if (align & HUD::BOTTOM)
|
||||
*y = *y - bot;
|
||||
*y -= bot;
|
||||
|
||||
*l = *x + left;
|
||||
*r = *x + right;
|
||||
|
|
Loading…
Add table
Reference in a new issue