MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / ChatShowConnectedMessage

Function ChatShowConnectedMessage

src/openrct2/network/NetworkBase.cpp:3572–3585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3570 }
3571
3572 void ChatShowConnectedMessage()
3573 {
3574 auto windowManager = Ui::GetWindowManager();
3575 std::string s = windowManager->GetKeyboardShortcutString("interface.misc.multiplayer_chat");
3576 const char* sptr = s.c_str();
3577
3578 utf8 buffer[256];
3579 FormatStringLegacy(buffer, sizeof(buffer), STR_MULTIPLAYER_CONNECTED_CHAT_HINT, &sptr);
3580
3581 Player server;
3582 server.name = "Server";
3583 const char* formatted = NetworkBase::FormatChat(&server, buffer);
3584 ChatAddHistory(formatted);
3585 }
3586
3587 // Display server greeting if one exists
3588 void ChatShowServerGreeting()

Callers 2

BeginServerMethod · 0.85
Client_Handle_MAPMethod · 0.85

Calls 4

GetWindowManagerFunction · 0.85
FormatStringLegacyFunction · 0.85
ChatAddHistoryFunction · 0.85

Tested by

no test coverage detected