9 #include <Wt/Dbo/Dbo.h>
28 addNew<Wt::WText>(
"<h2>Hall of fame</h2>");
32 std::string yourScore;
34 yourScore =
"Congratulations! You are currently leading the pack.";
36 yourScore =
"You are currently ranked number "
41 WText *score = addNew<WText>(
"<p>" + yourScore +
"</p>");
46 WTable *table = addNew<WTable>();
57 for (
auto& user : top) {
59 if (user.score != formerScore) {
60 formerScore = user.score;
69 if (!user.lastGame.isNull())
70 table->
elementAt(row, 4)->
addNew<
WText>(user.lastGame.timeTo(WDateTime::currentDateTime()) +
" ago");
78 WText *fineprint = addNew<WText>(
tr(
"highscore.info"));
std::vector< User > topUsers(int limit)
std::string userName() const
Wt::Auth::Login & login()
std::string toUTF8() const
void setId(const std::string &id)
WTableCell * elementAt(int row, int column)
WTableRow * rowAt(int row)
void setHeaderCount(int count, Orientation orientation=Orientation::Horizontal)
WString asString(const cpp17::any &v, const WString &formatString=WString())