mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-26 09:02:44 -06:00
Remove the current players blurb
This commit is contained in:
parent
2d1efcc36b
commit
599eebf511
1 changed files with 8 additions and 4 deletions
|
@ -207,15 +207,19 @@ public:
|
||||||
return LobbyItem::data(role);
|
return LobbyItem::data(role);
|
||||||
}
|
}
|
||||||
auto members = data(MemberListRole).toList();
|
auto members = data(MemberListRole).toList();
|
||||||
QString out = QObject::tr("Current Players in the room");
|
QString out;
|
||||||
|
bool first = true;
|
||||||
for (const auto& member : members) {
|
for (const auto& member : members) {
|
||||||
|
if (!first)
|
||||||
|
out += '\n';
|
||||||
const auto& m = member.value<LobbyMember>();
|
const auto& m = member.value<LobbyMember>();
|
||||||
if (m.GetGameName().isEmpty()) {
|
if (m.GetGameName().isEmpty()) {
|
||||||
out += QString(QObject::tr("\n%1 is not playing a game")).arg(m.GetUsername());
|
out += QString(QObject::tr("%1 is not playing a game")).arg(m.GetUsername());
|
||||||
} else {
|
} else {
|
||||||
out += QString(QObject::tr("\n%1 is playing %2"))
|
out +=
|
||||||
.arg(m.GetUsername(), m.GetGameName());
|
QString(QObject::tr("%1 is playing %2")).arg(m.GetUsername(), m.GetGameName());
|
||||||
}
|
}
|
||||||
|
first = false;
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue