21{
23
27
28 auto authWidget = std::make_unique<Auth::AuthWidget>(
session_.
login());
29 auto authWidgetPtr = authWidget.get();
30 authWidget->setModel(std::move(authModel));
31 authWidget->setRegistrationEnabled(true);
32
33 addNew<WText>("<h1>A Witty game: Hangman</h1>");
34
35 addWidget(std::move(authWidget));
36
39
40 links_ = addNew<WContainerWidget>();
41 links_->setStyleClass(
"links");
43
46
48 scoresAnchor_->setLink(WLink(LinkType::InternalPath,
"/highscores"));
49
50 WApplication::instance()->internalPathChanged()
52
53 authWidgetPtr->processEnvironment();
54}
WContainerWidget * links_
void handleInternalPath(const std::string &internalPath)
Wt::WAnchor * scoresAnchor_
Wt::WStackedWidget * mainStack_
Wt::WAnchor * backToGameAnchor_
static const Wt::Auth::AbstractPasswordService & passwordAuth()
static const Wt::Auth::AuthService & auth()
static std::vector< const Wt::Auth::OAuthService * > oAuth()
Wt::Auth::Login & login()
Wt::Auth::AbstractUserDatabase & users()