window drawing bugfix

This commit is contained in:
Geoffray Levasseur committed 2026-11-04 14:05:01 +01:00
1 parent 6f3556009a
commit 19006fac6c
5 files changed
+36 -27

No files matched your search

+2 -7
View File
@@ -27,13 +27,10 @@
// knowledge of the CeCILL license and that you accept its terms.
#include "game/Direct.h"
#include "game/GameServer.h"
#include <QDebug>
#include "game/Global.h"
#include "game/Start.h"
#include <QApplication>
#include <QTimer>
#include <QLocale>
#include <QTranslator>
@@ -59,11 +56,9 @@ int main(int argc, char *argv[])
// DirectDlg (created first, as in the original) is the main window; it
// shows the start screen once the game engine is up.
Cevo::DirectDlg direct;
Cevo::StartDlg start(&direct);
Cevo::Background background; // declared before the start dialog, which is its child
Cevo::StartDlg start(&direct, &background);
direct.setStartDlg(&start);
direct.show();
QTimer::singleShot(2000, [] { for (int i = 0; i < Cevo::GameServer::brains.count(); ++i) qWarning() << "BRAIN" << i << Cevo::GameServer::brains[i].fileName << Cevo::GameServer::brains[i].name() << int(Cevo::GameServer::brains[i].kind) << Cevo::GameServer::brains[i].beginner; }); // TEMP-GRAB
QTimer::singleShot(2500, [&start] { start.grab().save(QStringLiteral("/tmp/start-shot.png")); }); // TEMP-GRAB
QTimer::singleShot(3000, [] { QCoreApplication::quit(); }); // TEMP-GRAB
return a.exec();
}