From fac1927f5e13ef925f295c1a8c6b6d483f2b123e Mon Sep 17 00:00:00 2001 From: elsid Date: Wed, 19 Jul 2023 22:53:35 +0200 Subject: [PATCH] Use settings values for HUD settings --- apps/openmw/mwgui/windowmanagerimp.cpp | 7 ++----- apps/openmw/mwgui/windowmanagerimp.hpp | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index 2e9ab2473c..1d5b292e6f 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -183,7 +183,6 @@ namespace MWGui , mContainerWindow(nullptr) , mTranslationDataStorage(translationDataStorage) , mInputBlocker(nullptr) - , mCrosshairEnabled(Settings::Manager::getBool("crosshair", "HUD")) , mHudEnabled(true) , mCursorVisible(true) , mCursorActive(true) @@ -1148,9 +1147,7 @@ namespace MWGui bool changeRes = false; for (const auto& setting : changed) { - if (setting.first == "HUD" && setting.second == "crosshair") - mCrosshairEnabled = Settings::Manager::getBool("crosshair", "HUD"); - else if (setting.first == "GUI" && setting.second == "menu transparency") + if (setting.first == "GUI" && setting.second == "menu transparency") setMenuTransparency(Settings::gui().mMenuTransparency); else if (setting.first == "Video" && (setting.second == "resolution x" || setting.second == "resolution y" @@ -1580,7 +1577,7 @@ namespace MWGui void WindowManager::showCrosshair(bool show) { if (mHud) - mHud->setCrosshairVisible(show && mCrosshairEnabled); + mHud->setCrosshairVisible(show && Settings::hud().mCrosshair); } void WindowManager::updateActivatedQuickKey() diff --git a/apps/openmw/mwgui/windowmanagerimp.hpp b/apps/openmw/mwgui/windowmanagerimp.hpp index 0ed8a2e1d0..68eb099a56 100644 --- a/apps/openmw/mwgui/windowmanagerimp.hpp +++ b/apps/openmw/mwgui/windowmanagerimp.hpp @@ -457,7 +457,6 @@ namespace MWGui MyGUI::Widget* mInputBlocker; - bool mCrosshairEnabled; bool mHudEnabled; bool mCursorVisible; bool mCursorActive;