MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / GoToMainMenu

Method GoToMainMenu

Sources/Main.cpp:603–624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

601}
602
603void GameEventHandler::GoToMainMenu(bool afterIntro)
604{
605 InvokeAsync([this, afterIntro]() {
606 ZoneScopedNC("GameEventHandler::GoToMainMenu", 0x888888);
607
608 LOGI("Going to main menu");
609
610#if defined(WITH_MULTIPLAYER)
611 if (_networkManager != nullptr) {
612 _networkManager->Dispose();
613 _networkManager = nullptr;
614 _streamedAsset = nullptr;
615 }
616#endif
617 InGameConsole::Clear();
618 if (auto* mainMenu = runtime_cast<Menu::MainMenu>(_currentHandler.get())) {
619 mainMenu->Reset();
620 } else {
621 SetStateHandler(std::make_shared<Menu::MainMenu>(this, afterIntro));
622 }
623 });
624}
625
626void GameEventHandler::ChangeLevel(LevelInitialization&& levelInit)
627{

Callers 1

OnInitializeMethod · 0.45

Calls 3

DisposeMethod · 0.45
getMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected