add tableview feature if you click on a nickname on the table during

ranking games
This commit is contained in:
doitux
2011-11-15 10:16:29 +00:00
parent 4935ab3164
commit 56e18e1044
+10 -1
View File
@@ -51,7 +51,16 @@ void MyNameLabel::setText ( const QString &t, bool trans, bool guest, bool compu
if(myW->getSession()->getGameType() == Session::GAME_TYPE_INTERNET && !guest && !computerplayer ) {
// for internet game show players name with links to their profile included
this->setTextFormat(Qt::RichText);
QString linkString = QString("http://pokerth.net/redirect_user_profile.php?nick="+QUrl::toPercentEncoding(t));
QString linkString;
GameInfo info(myW->getSession()->getClientGameInfo(myW->getSession()->getClientCurrentGameId()));
if(info.data.gameType == GAME_TYPE_RANKING) {
linkString = QString("http://pokerth.net/redirect_user_profile.php?nick="+QUrl::toPercentEncoding(t)+"&tableview=1");
}
else {
linkString = QString("http://pokerth.net/redirect_user_profile.php?nick="+QUrl::toPercentEncoding(t));
}
if(trans) {
text = "<a style='color: rgba("+red+", "+green+", "+blue+", 80);' href='"+linkString+"'>"+t+"</a>";