mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Show message about mods that failed to load on opening main menu
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
#include "../../lib/filesystem/Filesystem.h"
|
||||
#include "../../lib/filesystem/CCompressedStream.h"
|
||||
#include "../../lib/mapping/CMapInfo.h"
|
||||
#include "../../lib/modding/CModHandler.h"
|
||||
#include "../../lib/VCMIDirs.h"
|
||||
#include "../../lib/CStopWatch.h"
|
||||
#include "../../lib/CThreadHelper.h"
|
||||
@@ -339,6 +340,17 @@ void CMainMenu::update()
|
||||
menu->switchToTab(menu->getActiveTab());
|
||||
}
|
||||
|
||||
static bool warnedAboutModDependencies = false;
|
||||
|
||||
if (!warnedAboutModDependencies)
|
||||
{
|
||||
warnedAboutModDependencies = true;
|
||||
auto errorMessages = CGI->modh->getModLoadErrors();
|
||||
|
||||
if (!errorMessages.empty())
|
||||
CInfoWindow::showInfoDialog(errorMessages, std::vector<std::shared_ptr<CComponent>>(), PlayerColor(1));
|
||||
}
|
||||
|
||||
// Handles mouse and key input
|
||||
GH.handleEvents();
|
||||
GH.windows().simpleRedraw();
|
||||
|
||||
Reference in New Issue
Block a user