add a splash screen to Noggit just for fun and more pricy look. Probably needs a better picture.
This commit is contained in:
BIN
media/splash.png
Normal file
BIN
media/splash.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 184 KiB |
@@ -6,6 +6,7 @@
|
||||
</qresource>
|
||||
<qresource prefix="/">
|
||||
<file alias="icon">../media/noggit_icon.png</file>
|
||||
<file alias="splash">../media/splash.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/shader">
|
||||
<file alias="m2_vs">../src/glsl/m2_vert.glsl</file>
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <QtWidgets/QFileDialog>
|
||||
#include <QtWidgets/QLabel>
|
||||
#include <QtWidgets/QMessageBox>
|
||||
#include <QSplashScreen>
|
||||
|
||||
#include "revision.h"
|
||||
|
||||
@@ -207,6 +208,10 @@ Noggit::Noggit(int argc, char *argv[])
|
||||
: fullscreen(false)
|
||||
, doAntiAliasing(true)
|
||||
{
|
||||
QPixmap pixmap = QPixmap(":splash");
|
||||
QSplashScreen splash(pixmap);
|
||||
splash.show();
|
||||
|
||||
InitLogging();
|
||||
assert (argc >= 1); (void) argc;
|
||||
initPath(argv);
|
||||
@@ -246,7 +251,10 @@ Noggit::Noggit(int argc, char *argv[])
|
||||
settings.setValue ("project/game_path", path.absolutePath());
|
||||
settings.setValue ("project/path", QString::fromStdString(project_path));
|
||||
|
||||
splash.showMessage("Loading game files...");
|
||||
loadMPQs(); // listfiles are not available straight away! They are async! Do not rely on anything at this point!
|
||||
|
||||
splash.showMessage("Reading databases...");
|
||||
OpenDBs();
|
||||
|
||||
if (!QGLFormat::hasOpenGL())
|
||||
|
||||
Reference in New Issue
Block a user