forked from pyrite-dev/milsko
fix stuff
This commit is contained in:
parent
21e2f2d599
commit
212d00ea13
3 changed files with 23 additions and 8 deletions
|
|
@ -70,7 +70,6 @@ void MwDrawText(MwWidget handle, MwFLFont ttf, MwPoint* point, const char* text,
|
|||
char* last = input;
|
||||
int cp;
|
||||
|
||||
if(strlen(text) == 0) return;
|
||||
#ifdef TTF
|
||||
if(ttf <= MwFLBuildFont(0xff)) ttf = assume_ttf(handle, ttf);
|
||||
#endif
|
||||
|
|
@ -95,6 +94,14 @@ void MwDrawText(MwWidget handle, MwFLFont ttf, MwPoint* point, const char* text,
|
|||
}
|
||||
}
|
||||
|
||||
if(strlen(line) == 0) {
|
||||
free(line);
|
||||
|
||||
last = input;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
p.x = point->x;
|
||||
if(align == MwALIGNMENT_CENTER) {
|
||||
p.x -= MwTextWidth(handle, ttf, line) / 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue