1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 09:39:43 +01:00

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

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;
}