Hide pause menu prior drawing "shutting down..." message
authorsapier <Sapier at GMX dot net>
Sat, 24 May 2014 11:05:10 +0000 (13:05 +0200)
committersapier <Sapier at GMX dot net>
Sat, 24 May 2014 11:45:05 +0000 (13:45 +0200)
src/game.cpp

index d7dfa11b12acad1a6789d4aa71f7dcbbaf062088..ef0d3a556f40b2893ae1ef3f8966054566e2d2cf 100644 (file)
@@ -3450,19 +3450,20 @@ void the_game(bool &kill, bool random_input, InputHandler *input,
                sky->drop();
        clear_particles();
        
+       /* cleanup menus */
+       while (g_menumgr.menuCount() > 0)
+       {
+               g_menumgr.m_stack.front()->setVisible(false);
+               g_menumgr.deletingMenu(g_menumgr.m_stack.front());
+       }
        /*
                Draw a "shutting down" screen, which will be shown while the map
                generator and other stuff quits
        */
        {
-               /*gui::IGUIStaticText *gui_shuttingdowntext = */
                wchar_t* text = wgettext("Shutting down stuff...");
                draw_load_screen(text, device, guienv, font, 0, -1, false);
                delete[] text;
-               /*driver->beginScene(true, true, video::SColor(255,0,0,0));
-               guienv->drawAll();
-               driver->endScene();
-               gui_shuttingdowntext->remove();*/
        }
 
        chat_backend.addMessage(L"", L"# Disconnected.");