ich musste nochmal den str_width2 durchgehen. hatte noch einen letzten bug
diese version ist nun entgültig und funktioniert tadellos =)
var str_width2(STRING * Str, FONT * Font)
{
var StrWidth = str_width(Str,Font);
var WhitespaceWidth = str_width(" a", Font) - str_width("a", Font);
STRING* temp = str_create("");
var count = 0;
str_cpy(temp,Str);
str_clip(temp,str_len(temp)-1);
if(str_stri(temp," ") != 0 )
while(1)
{
count +=1;
str_cpy(temp,Str);
str_clip(temp,str_len(Str)-(count));
if(str_stri(temp," ") > 0 )
break;
}
StrWidth += WhitespaceWidth* count;
return StrWidth;
}