This commit is contained in:
ackimixs
2024-05-15 17:53:29 +02:00
parent 3c9bd01328
commit a484f8efc1
4 changed files with 16 additions and 0 deletions

View File

@@ -122,6 +122,12 @@ MainWindow::MainWindow(const char *address, int port, QWidget *parent) : QMainWi
this->tcpClient->sendMessage(message);
});
gifLabel = new QLabel(this);
gifMovie = new QMovie(":/path/to/your/gif.gif");
gifLabel->setMovie(gifMovie);
gifMovie->start();
this->stackedWidget = new QStackedWidget(centralWidget);
this->stackedWidget->addWidget(this->home);
this->stackedWidget->addWidget(this->homologation);
@@ -130,6 +136,7 @@ MainWindow::MainWindow(const char *address, int port, QWidget *parent) : QMainWi
this->stackedWidget->addWidget(this->testMode);
this->stackedWidget->addWidget(this->waintingForTirette);
this->stackedWidget->addWidget(this->inGame);
this->stackedWidget->addWidget(this->gifLabel);
this->mainLayout->addWidget(this->stackedWidget);
@@ -258,4 +265,7 @@ void MainWindow::handleMessage(const std::string& message)
else if (list[2] == "add point") {
this->inGame->addScore(std::stoi(list[3]));
}
else if (list[2] == "game mode" && list[3] == "gc") {
this->setWidgetNb(7);
}
}