mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-17 20:10:23 +03:00
Update some splashes.
Allow messages to be split properly across several lines.
This commit is contained in:
@@ -43,6 +43,17 @@ Gui::Gui(Minecraft* pMinecraft)
|
||||
|
||||
void Gui::addMessage(const std::string& s)
|
||||
{
|
||||
// if the message contains a new line, add each line separately:
|
||||
if (s.find("\n") != std::string::npos)
|
||||
{
|
||||
std::stringstream ss(s);
|
||||
std::string line;
|
||||
while (std::getline(ss, line))
|
||||
addMessage(line);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
std::string str = s;
|
||||
|
||||
while (m_pMinecraft->m_pFont->width(str) > 320)
|
||||
|
||||
Reference in New Issue
Block a user