Qt/NetPlay: Show feedback for index adding

This commit is contained in:
spycrab
2019-04-11 01:21:40 +02:00
parent d90d641ec7
commit 8b6bb39e82
6 changed files with 50 additions and 1 deletions

View File

@ -393,6 +393,19 @@ void NetPlayDialog::OnChat()
});
}
void NetPlayDialog::OnIndexAdded(bool success, const std::string error)
{
DisplayMessage(success ? tr("Successfully added to the NetPlay index") :
tr("Failed to add this session to the NetPlay index: %1")
.arg(QString::fromStdString(error)),
success ? "green" : "red");
}
void NetPlayDialog::OnIndexRefreshFailed(const std::string error)
{
DisplayMessage(QString::fromStdString(error), "red");
}
void NetPlayDialog::OnStart()
{
if (!Settings::Instance().GetNetPlayClient()->DoAllPlayersHaveGame())

View File

@ -60,6 +60,9 @@ public:
void OnGameStartAborted() override;
void OnGolferChanged(bool is_golfer, const std::string& golfer_name) override;
void OnIndexAdded(bool success, const std::string error) override;
void OnIndexRefreshFailed(const std::string error) override;
bool IsRecording() override;
std::string FindGame(const std::string& game) override;
std::shared_ptr<const UICommon::GameFile> FindGameFile(const std::string& game) override;