diff --git a/src/intermission/intermission.cpp b/src/intermission/intermission.cpp index 7a34841d44..2227303d0f 100644 --- a/src/intermission/intermission.cpp +++ b/src/intermission/intermission.cpp @@ -49,6 +49,7 @@ #include "c_bind.h" #include "g_level.h" #include "p_conversation.h" +#include "menu/menu.h" FIntermissionDescriptorList IntermissionDescriptors; @@ -96,6 +97,14 @@ void DIntermissionScreen::Init(FIntermissionAction *desc, bool first) { texname = gameinfo.finalePages[v].GetChars(); } + else if (gameinfo.finalePages.Size() > 0) + { + texname = gameinfo.finalePages[0].GetChars(); + } + else + { + texname = gameinfo.titlePage; + } } else if (*texname == '$') { @@ -125,6 +134,7 @@ void DIntermissionScreen::Init(FIntermissionAction *desc, bool first) screen->UpdatePalette (); mPaletteChanged = true; NoWipe = 1; + M_EnableMenu(false); } mOverlays.Resize(desc->mOverlays.Size()); for (unsigned i=0; i < mOverlays.Size(); i++) @@ -206,6 +216,7 @@ void DIntermissionScreen::Destroy() screen->UpdatePalette (); NoWipe = 5; mPaletteChanged = false; + M_EnableMenu(true); } Super::Destroy(); } diff --git a/src/menu/menu.cpp b/src/menu/menu.cpp index c0ef72a31c..3a7e0794f7 100644 --- a/src/menu/menu.cpp +++ b/src/menu/menu.cpp @@ -79,6 +79,7 @@ int MenuButtonTickers[NUM_MKEYS]; bool MenuButtonOrigin[NUM_MKEYS]; int BackbuttonTime; fixed_t BackbuttonAlpha; +static bool MenuEnabled = true; #define KEY_REPEAT_DELAY (TICRATE*5/12) @@ -633,7 +634,7 @@ bool M_Responder (event_t *ev) } return DMenu::CurrentMenu->Responder(ev) || !keyup; } - else + else if (MenuEnabled) { if (ev->type == EV_KeyDown) { @@ -761,6 +762,18 @@ void M_Init (void) } +//============================================================================= +// +// +// +//============================================================================= + +void M_EnableMenu (bool on) +{ + MenuEnabled = on; +} + + //============================================================================= // // [RH] Most menus can now be accessed directly diff --git a/src/menu/menu.h b/src/menu/menu.h index f13300bc0f..e8632a0b2a 100644 --- a/src/menu/menu.h +++ b/src/menu/menu.h @@ -637,6 +637,7 @@ public: struct event_t; +void M_EnableMenu (bool on) ; bool M_Responder (event_t *ev); void M_Ticker (void); void M_Drawer (void);