From 6cb3c832488acbcf43b8fecdc1f98da064b29c84 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Tue, 8 Aug 2017 20:36:50 +0400 Subject: [PATCH] Add transparency for interactive messageboxes in game mode --- apps/openmw/mwgui/messagebox.cpp | 2 +- files/mygui/CMakeLists.txt | 1 + ...openmw_interactive_messagebox_notransp.layout | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 files/mygui/openmw_interactive_messagebox_notransp.layout diff --git a/apps/openmw/mwgui/messagebox.cpp b/apps/openmw/mwgui/messagebox.cpp index f8ddeba3e..ab43df0f1 100644 --- a/apps/openmw/mwgui/messagebox.cpp +++ b/apps/openmw/mwgui/messagebox.cpp @@ -196,7 +196,7 @@ namespace MWGui InteractiveMessageBox::InteractiveMessageBox(MessageBoxManager& parMessageBoxManager, const std::string& message, const std::vector& buttons) - : WindowModal("openmw_interactive_messagebox.layout") + : WindowModal(MWBase::Environment::get().getWindowManager()->isGuiMode() ? "openmw_interactive_messagebox_notransp.layout" : "openmw_interactive_messagebox.layout") , mMessageBoxManager(parMessageBoxManager) , mButtonPressed(-1) { diff --git a/files/mygui/CMakeLists.txt b/files/mygui/CMakeLists.txt index 6592de56e..ed673c5d6 100644 --- a/files/mygui/CMakeLists.txt +++ b/files/mygui/CMakeLists.txt @@ -38,6 +38,7 @@ set(MYGUI_FILES openmw_hud.layout openmw_infobox.layout openmw_interactive_messagebox.layout + openmw_interactive_messagebox_notransp.layout openmw_inventory_window.layout openmw_journal.layout openmw_journal.skin.xml diff --git a/files/mygui/openmw_interactive_messagebox_notransp.layout b/files/mygui/openmw_interactive_messagebox_notransp.layout new file mode 100644 index 000000000..6b79b9417 --- /dev/null +++ b/files/mygui/openmw_interactive_messagebox_notransp.layout @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + +