Fix translating text box ignoring line limit

Originally I did a straight deep copy of the original lines, but this
ignores the limit of either 12 or 26 lines in a text box. So we defer to
addline() which will enforce the limit accordingly, just like it would
do with the original text box.
This commit is contained in:
Misa 2024-01-20 15:26:36 -08:00 committed by Misa Elizabeth Kai
parent 8b03fbd9f4
commit e8a231f2e2
1 changed files with 6 additions and 2 deletions

View File

@ -239,8 +239,12 @@ void textboxclass::translate(void)
{
if (!loc::is_cutscene_translated(original.script_name))
{
// Copy the original back
lines = std::vector<std::string>(original.lines);
// Copy the original back, but keep the limit of lines in mind
lines.clear();
for (size_t i = 0; i < original.lines.size(); i++)
{
addline(original.lines[i]);
}
return;
}