mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-29 07:15:34 +00:00
Merge branch 'internationalonoff' into 'master'
Fix localized checkbox toggling behavior See merge request OpenMW/openmw!4501
This commit is contained in:
commit
710aa9ad4f
1 changed files with 4 additions and 3 deletions
|
@ -18,6 +18,7 @@
|
|||
#include <SDL_video.h>
|
||||
|
||||
#include <components/debug/debuglog.hpp>
|
||||
#include <components/l10n/manager.hpp>
|
||||
#include <components/lua_ui/scriptsettings.hpp>
|
||||
#include <components/misc/constants.hpp>
|
||||
#include <components/misc/display.hpp>
|
||||
|
@ -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<MyGUI::Button>()->getCaption() == on)
|
||||
{
|
||||
_sender->castType<MyGUI::Button>()->setCaption(
|
||||
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOff", "Off")));
|
||||
_sender->castType<MyGUI::Button>()->setCaption(MyGUI::UString(off));
|
||||
newState = false;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue