| 424 | width += GEngine->GetTextWidth(_size, _font, temp); |
| 425 | if (width > _w) |
| 426 | { |
| 427 | if (word) |
| 428 | { |
| 429 | p = word; |
| 430 | } |
| 431 | else |
| 432 | { |
| 433 | p = q; |
| 434 | } |
| 435 | lines.Add(p - buffer); |
| 436 | word = nullptr; |
| 437 | width = 0; |
| 438 | } |
| 439 | } |
| 440 | } |
| 441 | |
| 442 | for (int i = lines.Size() - 1; i >= 0; i--) |
| 443 | { |
| 444 | char* line = buffer.MutableData() + lines[i]; |
| 445 | |
| 446 | float wline = GEngine->GetTextWidth(_size, _font, line); |
| 447 | MipInfo mip = GLOB_ENGINE->TextBank()->UseMipmap(nullptr, 0, 0); |
| 448 | GEngine->Draw2D(mip, colorB, Rect2DPixel(_x * w, top * h, wline * w, _h * h)); |
| 449 | GEngine->DrawText(Point2DFloat(_x, top), _size, Rect2DFloat(_x, top, _w, _h), _font, color, line); |
| 450 | *line = 0; |
| 451 | |
| 452 | row--; |
no test coverage detected