From 4eb5b24af550eeac1a69a98497ef920ac52c0a1c Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Mon, 6 Jan 2025 09:43:44 +0300 Subject: [PATCH] Fix localized checkbox toggling behavior --- apps/openmw/mwgui/settingswindow.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwgui/settingswindow.cpp b/apps/openmw/mwgui/settingswindow.cpp index 7bd8af9add7..02353c5d416 100644 --- a/apps/openmw/mwgui/settingswindow.cpp +++ b/apps/openmw/mwgui/settingswindow.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -669,12 +670,12 @@ namespace MWGui void SettingsWindow::onButtonToggled(MyGUI::Widget* _sender) { - std::string_view on = MWBase::Environment::get().getWindowManager()->getGameSettingString("sOn", "On"); + const std::string on = MWBase::Environment::get().getL10nManager()->getMessage("Interface", "On"); + const std::string off = MWBase::Environment::get().getL10nManager()->getMessage("Interface", "Off"); bool newState; if (_sender->castType()->getCaption() == on) { - _sender->castType()->setCaption( - MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOff", "Off"))); + _sender->castType()->setCaption(MyGUI::UString(off)); newState = false; } else