[Fix] Bug iwth addtext and negative positions.

This commit is contained in:
Allanis 2013-02-27 15:43:37 +00:00
parent 5694a0b598
commit 8cb99e490c

View File

@ -121,9 +121,9 @@ void window_addText(const unsigned int wid, const int x, const int y,
wgt->h = (double) h; wgt->h = (double) h;
if(font == NULL) wgt->dat.txt.font = &gl_defFont; if(font == NULL) wgt->dat.txt.font = &gl_defFont;
else wgt->dat.txt.font = font; else wgt->dat.txt.font = font;
if(x < 0) wgt->x = wdw->w - wgt->w + x; if(x < 0) wgt->x = wdw->w - wgt->w + x - w;
else wgt->x = (double)x; else wgt->x = (double)x;
if(y < 0) wgt->y = wdw->h + y; if(y < 0) wgt->y = wdw->h + y - h;
else wgt->y = (double) y; else wgt->y = (double) y;
wgt->dat.txt.colour = colour; wgt->dat.txt.colour = colour;
wgt->dat.txt.centered = centered; wgt->dat.txt.centered = centered;