1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Fixes after merge, move removeGUI to Client class

This commit is contained in:
Dydzio
2023-01-11 17:11:44 +01:00
parent aac515f64e
commit cb3fd24ec0
4 changed files with 19 additions and 50 deletions

View File

@@ -46,9 +46,9 @@
#include "../lib/CThreadHelper.h"
#include "../lib/registerTypes/RegisterTypes.h"
#include "gui/CGuiHandler.h"
#include "CMT.h"
#include "CServerHandler.h"
#include "../lib/ScriptHandler.h"
#include "windows/CAdvmapInterface.h"
#include <vcmi/events/EventBus.h>
#ifdef VCMI_ANDROID
@@ -761,6 +761,20 @@ void CClient::reinitScripting()
#endif
}
void CClient::removeGUI()
{
// CClient::endGame
GH.curInt = nullptr;
if(GH.topInt())
GH.topInt()->deactivate();
adventureInt = nullptr;
GH.listInt.clear();
GH.objsToBlit.clear();
GH.statusbar = nullptr;
logGlobal->info("Removed GUI.");
LOCPLINT = nullptr;
}
#ifdef VCMI_ANDROID
extern "C" JNIEXPORT void JNICALL Java_eu_vcmi_vcmi_NativeMethods_notifyServerClosed(JNIEnv * env, jobject cls)