fix(Notification): some languages don't make use of spaces(#3316)
This commit is contained in:
parent
05aadfe98e
commit
8bae9f5b54
@ -21,7 +21,7 @@ namespace big
|
||||
fadeEnd.Value.w *= alpha;
|
||||
|
||||
int j = 0;
|
||||
int prevSpace = 0;
|
||||
int prevSpace = -1;
|
||||
float total_size = 0.f;
|
||||
std::vector<std::string> split_points;
|
||||
|
||||
@ -42,12 +42,21 @@ namespace big
|
||||
split_points.push_back(message.substr(j, i));
|
||||
}
|
||||
else if (size.x >= 330.f)
|
||||
{
|
||||
if (prevSpace != -1)
|
||||
{
|
||||
total_size = total_size + size.y;
|
||||
split_points.push_back(message.substr(j, prevSpace - j));
|
||||
j = prevSpace + 1;
|
||||
i = prevSpace;
|
||||
}
|
||||
else
|
||||
{
|
||||
total_size = total_size + size.y;
|
||||
split_points.push_back(message.substr(j, i - j));
|
||||
j = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dl->AddRectFilled({(float)*g_pointers->m_gta.m_resolution_x - 360.f, 10.f + start_pos},
|
||||
|
Reference in New Issue
Block a user