mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-22 03:57:45 +00:00
21 lines
No EOL
536 B
C++
21 lines
No EOL
536 B
C++
#include "settings.h"
|
|
|
|
#include <KConfig>
|
|
#include <KConfigGroup>
|
|
#include <QCoreApplication>
|
|
#include <QMessageBox>
|
|
|
|
QString getGameDirectory() {
|
|
KConfig config("novusrc");
|
|
KConfigGroup game = config.group("Game");
|
|
|
|
if (game.hasKey("GameDir")) {
|
|
return game.readEntry("GameDir");
|
|
} else {
|
|
QMessageBox msgBox;
|
|
msgBox.setText("The game directory has not been set. Please open the Novus SDK launcher and set it.");
|
|
msgBox.exec();
|
|
QCoreApplication::quit();
|
|
return {};
|
|
}
|
|
} |