Update some splashes.

Allow messages to be split properly across several lines.
This commit is contained in:
iProgramInCpp
2023-08-12 10:39:23 +03:00
parent d09ef3fd04
commit 826315c228
3 changed files with 28 additions and 7 deletions

View File

@@ -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)

View File

@@ -61,7 +61,7 @@ const char* gSplashes[] =
"Minecraft!",
"Yaaay!",
"Multiplayer!",
"Touch compatible!",
"Not yet touch compatible!",// "Touch compatible!",
"Undocumented!",
"Ingots!",
"Exploding creepers!",
@@ -73,7 +73,7 @@ const char* gSplashes[] =
"Exclusive!",
"The bee's knees!",
"Down with O.P.P.!",
"Closed source!",
"Open source!", //"Closed source!",
"Classy!",
"Wow!",
"Not on steam!",
@@ -105,7 +105,7 @@ const char* gSplashes[] =
"Complex cellular automata!",
"Yes, sir!",
"Played by cowboys!",
"OpenGL ES 1.1!",
"OpenGL 1.5!", // "OpenGL ES 1.1!",
"Thousands of colors!",
"Try it!",
"Age of Wonders is better!",
@@ -160,7 +160,7 @@ const char* gSplashes[] =
"Lewd with two dudes with food!",
"Kiss the sky!",
"20 GOTO 10!",
"Verlet intregration!",
"Verlet intregration!", // [sic]
"Peter Griffin!",
"Do not distribute!",
"Cogito ergo sum!",
@@ -322,10 +322,13 @@ const char* gSplashes[] =
"Pretty scary!",
"I have a suggestion.",
"Now with extra hugs!",
"Almost C++11!",
"Almost C++03!", // "Almost C++11!",
"Woah.",
"HURNERJSGER?",
"What's up, Doc?"
"What's up, Doc?",
// custom:
"https://github.com/ReMinecraftPE/mcpe"
};
StartMenuScreen::StartMenuScreen() :

View File

@@ -414,7 +414,14 @@ void ServerSideNetworkHandler::commandStats(OnlinePlayer* player, const std::vec
return;
std::stringstream ss;
ss << "Server uptime: " << getTimeS() << " seconds. Host's name: " << m_pMinecraft->m_pUser->field_0;
ss << "Server uptime: " << getTimeS() << " seconds.\n";
ss << "Host's name: " << m_pMinecraft->m_pUser->field_0 << "\n";
int nPlayers = int(m_onlinePlayers.size());
if (nPlayers == 1)
ss << "There is 1 player online.";
else
ss << "There are " << nPlayers << " players online.";
sendMessage(player, ss.str());
}