| 379 | } |
| 380 | |
| 381 | void CEntryText::FixMaxWidthA(uint8_t font) |
| 382 | { |
| 383 | if (MaxWidth <= 0) |
| 384 | { |
| 385 | return; |
| 386 | } |
| 387 | |
| 388 | int width = g_FontManager.GetWidthA(font, GetTextA()); |
| 389 | size_t len = GetTextA().length(); |
| 390 | while (MaxWidth < width && len > 0) |
| 391 | { |
| 392 | Remove((m_Position > 0), nullptr); |
| 393 | len--; |
| 394 | width = g_FontManager.GetWidthA(font, GetTextA()); |
| 395 | } |
| 396 | } |
| 397 | |
| 398 | void CEntryText::FixMaxWidthW(uint8_t font) |
| 399 | { |