Completely remove Graphics::bprint

Only three deprecated functions remain:
- Graphics::Print
- Graphics::PrintWrap
- Graphics::bigprint

I also fixed multiline transparent textboxes having their outlines
overlap the text itself, and fixed textboxclass::padtowidth assuming
glyph widths of 8 (it made the hints at the start of intermission 1
run offscreen for example)
This commit is contained in:
Dav999-v
2023-01-17 22:18:39 +01:00
committed by Misa Elizabeth Kai
parent d784f7f61a
commit ddaabb3efe
8 changed files with 75 additions and 64 deletions

View File

@@ -135,7 +135,9 @@ void textboxclass::padtowidth(size_t new_w)
/* Pad the current text so that each line is new_w pixels wide.
* Each existing line is centered in that width. */
resize();
size_t chars_w = SDL_max(w-16, new_w) / 8;
uint8_t glyph_w = 8;
font::glyph_dimensions(print_flags, &glyph_w, NULL);
size_t chars_w = SDL_max(w-16, new_w) / glyph_w;
for (size_t iter = 0; iter < lines.size(); iter++)
{
size_t n_glyphs = utf8::unchecked::distance(lines[iter].begin(), lines[iter].end());