From 3b4184816b88351e97fc783f9f88998a4f53b5b2 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 9 Aug 2019 15:22:52 +0200 Subject: [PATCH] - do not blur the background for portrait-less conversations. --- src/menu/menu.cpp | 3 ++- src/menu/menu.h | 1 + wadsrc/static/zscript/ui/menu/conversationmenu.zs | 1 + wadsrc/static/zscript/ui/menu/menu.zs | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/menu/menu.cpp b/src/menu/menu.cpp index 4f179155f6..768d8d06c9 100644 --- a/src/menu/menu.cpp +++ b/src/menu/menu.cpp @@ -887,7 +887,7 @@ void M_Drawer (void) if (CurrentMenu != nullptr && menuactive != MENU_Off) { - screen->BlurScene(gameinfo.bluramount); + if (!CurrentMenu->DontBlur) screen->BlurScene(gameinfo.bluramount); if (!CurrentMenu->DontDim) { M_Dim(); @@ -1197,6 +1197,7 @@ DEFINE_FIELD(DMenu, mParentMenu) DEFINE_FIELD(DMenu, mMouseCapture); DEFINE_FIELD(DMenu, mBackbuttonSelected); DEFINE_FIELD(DMenu, DontDim); +DEFINE_FIELD(DMenu, DontBlur); DEFINE_FIELD(DMenuDescriptor, mMenuName) DEFINE_FIELD(DMenuDescriptor, mNetgameMessage) diff --git a/src/menu/menu.h b/src/menu/menu.h index 2966653261..d93dabd8c8 100644 --- a/src/menu/menu.h +++ b/src/menu/menu.h @@ -271,6 +271,7 @@ public: bool mMouseCapture; bool mBackbuttonSelected; bool DontDim; + bool DontBlur; static int InMenu; DMenu(DMenu *parent = NULL); diff --git a/wadsrc/static/zscript/ui/menu/conversationmenu.zs b/wadsrc/static/zscript/ui/menu/conversationmenu.zs index 5f62eba31e..a7304a5841 100644 --- a/wadsrc/static/zscript/ui/menu/conversationmenu.zs +++ b/wadsrc/static/zscript/ui/menu/conversationmenu.zs @@ -119,6 +119,7 @@ class ConversationMenu : Menu let tex = TexMan.CheckForTexture (CurNode.Backdrop, TexMan.Type_MiscPatch); mHasBackdrop = tex.isValid(); + DontBlur = !mHasBackdrop; if (!generic_ui && !dlg_vgafont) { diff --git a/wadsrc/static/zscript/ui/menu/menu.zs b/wadsrc/static/zscript/ui/menu/menu.zs index 1e006d815e..72b51753b5 100644 --- a/wadsrc/static/zscript/ui/menu/menu.zs +++ b/wadsrc/static/zscript/ui/menu/menu.zs @@ -90,6 +90,7 @@ class Menu : Object native ui version("2.4") native bool mMouseCapture; native bool mBackbuttonSelected; native bool DontDim; + native bool DontBlur; native static int MenuTime(); native static Menu GetCurrentMenu(); @@ -113,6 +114,7 @@ class Menu : Object native ui version("2.4") mMouseCapture = false; mBackbuttonSelected = false; DontDim = false; + DontBlur = false; } //=============================================================================