9 #include <Wt/Dbo/Dbo.h> 29 this->
addWidget(cpp14::make_unique<WText>(
"<h2>Hall of fame</h2>"));
33 std::string yourScore;
35 yourScore =
"Congratulations! You are currently leading the pack.";
37 yourScore =
"You are currently ranked number " 42 WText *score = this->
addWidget(cpp14::make_unique<WText>(
"<p>" + yourScore +
"</p>"));
58 for (
auto& user : top) {
60 if (user.score != formerScore) {
61 formerScore = user.score;
70 if (!user.lastGame.isNull())
71 table->
elementAt(row, 4)->
addWidget(cpp14::make_unique<WText>(user.lastGame.timeTo(WDateTime::currentDateTime())
80 WText *fineprint = this->
addWidget(cpp14::make_unique<WText>(
tr(
"highscore.info")));
void setHeaderCount(int count, Orientation orientation=Orientation::Horizontal)
std::string toUTF8() const
WTableCell * elementAt(int row, int column)
void setId(const std::string &id)
WString asString(const cpp17::any &v, const WString &formatString=WString())
std::vector< User > topUsers(int limit)
WTableRow * rowAt(int row)
std::string userName() const