Cavoke  1.1.0
A Platform for creating and hosting multiplayer turn-based board games
Loading...
Searching...
No Matches
joingameview.cpp
1#include "joingameview.h"
2#include "authdialog.h"
3#include "ui_joingameview.h"
4
5JoinGameView::JoinGameView(QWidget *parent)
6 : QMainWindow(parent), ui(new Ui::JoinGameView) {
7 ui->setupUi(this);
8}
9
10JoinGameView::~JoinGameView() {
11 delete ui;
12}
13
14void JoinGameView::on_backButton_clicked() {
15 this->close();
16 emit shownStartView();
17}
18
19void JoinGameView::on_joinGameButton_clicked() {
20 QString inviteCode = ui->inviteCodeInput->text();
21 // verify user is authenticated
22 if (!AuthDialog::verifyAuth(this)) {
23 return;
24 }
25 if (!inviteCode.isEmpty()) {
26 emit joinedGame(inviteCode);
27 }
28}
static bool verifyAuth(QWidget *parent=nullptr)
Definition: authdialog.cpp:28