Fixed: Text alignment for popup boxes

This commit is contained in:
aristocratos 2022-02-09 15:38:48 +01:00
parent 3b9144dff3
commit 1f4b724d60

View file

@ -605,7 +605,7 @@ namespace Menu {
box_contents = Draw::createBox(x, y, width, height, Theme::c("hi_fg"), true, title) + Mv::d(1);
for (const auto& line : content) {
box_contents += Mv::save + Mv::r(width / 2 - Fx::uncolor(line).size() / 2 - 1) + line + Mv::restore + Mv::d(1);
box_contents += Mv::save + Mv::r(max(0ul, (width / 2) - (Fx::uncolor(line).size() / 2) - 1)) + line + Mv::restore + Mv::d(1);
}
}