mirror of
https://github.com/celisej567/mcpe.git
synced 2026-01-05 18:10:09 +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)
|
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;
|
std::string str = s;
|
||||||
|
|
||||||
while (m_pMinecraft->m_pFont->width(str) > 320)
|
while (m_pMinecraft->m_pFont->width(str) > 320)
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ const char* gSplashes[] =
|
|||||||
"Minecraft!",
|
"Minecraft!",
|
||||||
"Yaaay!",
|
"Yaaay!",
|
||||||
"Multiplayer!",
|
"Multiplayer!",
|
||||||
"Touch compatible!",
|
"Not yet touch compatible!",// "Touch compatible!",
|
||||||
"Undocumented!",
|
"Undocumented!",
|
||||||
"Ingots!",
|
"Ingots!",
|
||||||
"Exploding creepers!",
|
"Exploding creepers!",
|
||||||
@@ -73,7 +73,7 @@ const char* gSplashes[] =
|
|||||||
"Exclusive!",
|
"Exclusive!",
|
||||||
"The bee's knees!",
|
"The bee's knees!",
|
||||||
"Down with O.P.P.!",
|
"Down with O.P.P.!",
|
||||||
"Closed source!",
|
"Open source!", //"Closed source!",
|
||||||
"Classy!",
|
"Classy!",
|
||||||
"Wow!",
|
"Wow!",
|
||||||
"Not on steam!",
|
"Not on steam!",
|
||||||
@@ -105,7 +105,7 @@ const char* gSplashes[] =
|
|||||||
"Complex cellular automata!",
|
"Complex cellular automata!",
|
||||||
"Yes, sir!",
|
"Yes, sir!",
|
||||||
"Played by cowboys!",
|
"Played by cowboys!",
|
||||||
"OpenGL ES 1.1!",
|
"OpenGL 1.5!", // "OpenGL ES 1.1!",
|
||||||
"Thousands of colors!",
|
"Thousands of colors!",
|
||||||
"Try it!",
|
"Try it!",
|
||||||
"Age of Wonders is better!",
|
"Age of Wonders is better!",
|
||||||
@@ -160,7 +160,7 @@ const char* gSplashes[] =
|
|||||||
"Lewd with two dudes with food!",
|
"Lewd with two dudes with food!",
|
||||||
"Kiss the sky!",
|
"Kiss the sky!",
|
||||||
"20 GOTO 10!",
|
"20 GOTO 10!",
|
||||||
"Verlet intregration!",
|
"Verlet intregration!", // [sic]
|
||||||
"Peter Griffin!",
|
"Peter Griffin!",
|
||||||
"Do not distribute!",
|
"Do not distribute!",
|
||||||
"Cogito ergo sum!",
|
"Cogito ergo sum!",
|
||||||
@@ -322,10 +322,13 @@ const char* gSplashes[] =
|
|||||||
"Pretty scary!",
|
"Pretty scary!",
|
||||||
"I have a suggestion.",
|
"I have a suggestion.",
|
||||||
"Now with extra hugs!",
|
"Now with extra hugs!",
|
||||||
"Almost C++11!",
|
"Almost C++03!", // "Almost C++11!",
|
||||||
"Woah.",
|
"Woah.",
|
||||||
"HURNERJSGER?",
|
"HURNERJSGER?",
|
||||||
"What's up, Doc?"
|
"What's up, Doc?",
|
||||||
|
|
||||||
|
// custom:
|
||||||
|
"https://github.com/ReMinecraftPE/mcpe"
|
||||||
};
|
};
|
||||||
|
|
||||||
StartMenuScreen::StartMenuScreen() :
|
StartMenuScreen::StartMenuScreen() :
|
||||||
|
|||||||
@@ -414,7 +414,14 @@ void ServerSideNetworkHandler::commandStats(OnlinePlayer* player, const std::vec
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
std::stringstream ss;
|
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());
|
sendMessage(player, ss.str());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user