Show network tips only once per game

This commit is contained in:
Benau 2018-10-25 14:24:35 +08:00
parent 610c976ce2
commit 20ea6d4a5f
2 changed files with 19 additions and 9 deletions

View File

@ -542,11 +542,16 @@ void ClientLobby::connectionAccepted(Event* event)
// ========
Log::info("ClientLobby", "The server accepted the connection.");
// I18N: Message shown in network lobby to tell user that
// player name is clickable
core::stringw msg = _("Press player name in the list for player management"
" and ranking information.");
MessageQueue::add(MessageQueue::MT_GENERIC, msg);
static bool shown_msg = false;
if (!shown_msg)
{
shown_msg = true;
// I18N: Message shown in network lobby to tell user that
// player name is clickable
core::stringw msg = _("Press player name in the list for player"
" management and ranking information.");
MessageQueue::add(MessageQueue::MT_GENERIC, msg);
}
STKHost::get()->setMyHostId(data.getUInt32());
assert(!NetworkConfig::get()->isAddingNetworkPlayers());

View File

@ -170,10 +170,15 @@ void TracksScreen::beforeAddingWidget()
getWidget("all-track")->m_properties[GUIEngine::PROP_WIDTH] = "60%";
getWidget("vote")->setVisible(true);
calculateLayout();
//I18N: In track screen for networking, clarify voting phase
core::stringw msg = _("If a majority of players all select the same"
" track and race settings, voting will end early.");
MessageQueue::add(MessageQueue::MT_GENERIC, msg);
static bool shown_msg = false;
if (!shown_msg)
{
shown_msg = true;
//I18N: In track screen for networking, clarify voting phase
core::stringw msg = _("If a majority of players all select the"
" same track and race settings, voting will end early.");
MessageQueue::add(MessageQueue::MT_GENERIC, msg);
}
}
else
{