|
|
|
@ -169,8 +169,9 @@ namespace MWGui
|
|
|
|
|
if (type == checkButtonType)
|
|
|
|
|
{
|
|
|
|
|
std::string initialValue
|
|
|
|
|
= Settings::Manager::getBool(getSettingName(current), getSettingCategory(current)) ? "#{sOn}"
|
|
|
|
|
: "#{sOff}";
|
|
|
|
|
= Settings::Manager::getBool(getSettingName(current), getSettingCategory(current))
|
|
|
|
|
? "#{Interface:On}"
|
|
|
|
|
: "#{Interface:Off}";
|
|
|
|
|
current->castType<MyGUI::Button>()->setCaptionWithReplacing(initialValue);
|
|
|
|
|
if (init)
|
|
|
|
|
current->eventMouseButtonClick += MyGUI::newDelegate(this, &SettingsWindow::onButtonToggled);
|
|
|
|
@ -250,7 +251,7 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
configureWidgets(mMainWidget, true);
|
|
|
|
|
|
|
|
|
|
setTitle("#{sOptions}");
|
|
|
|
|
setTitle("#{OMWEngine:SettingsWindow}");
|
|
|
|
|
|
|
|
|
|
getWidget(mSettingsTab, "SettingsTab");
|
|
|
|
|
getWidget(mOkButton, "OkButton");
|
|
|
|
@ -415,7 +416,8 @@ namespace MWGui
|
|
|
|
|
mPrimaryLanguage->setIndexSelected(MyGUI::ITEM_NONE);
|
|
|
|
|
|
|
|
|
|
mSecondaryLanguage->removeAllItems();
|
|
|
|
|
mSecondaryLanguage->addItem(MyGUI::LanguageManager::getInstance().replaceTags("#{sNone}"), std::string());
|
|
|
|
|
mSecondaryLanguage->addItem(
|
|
|
|
|
MyGUI::LanguageManager::getInstance().replaceTags("#{Interface:None}"), std::string());
|
|
|
|
|
mSecondaryLanguage->setIndexSelected(0);
|
|
|
|
|
|
|
|
|
|
size_t i = 0;
|
|
|
|
@ -456,7 +458,7 @@ namespace MWGui
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
|
|
|
|
|
dialog->askForConfirmation("#{sNotifyMessage67}");
|
|
|
|
|
dialog->askForConfirmation("#{OMWEngine:ConfirmResolution}");
|
|
|
|
|
dialog->eventOkClicked.clear();
|
|
|
|
|
dialog->eventOkClicked += MyGUI::newDelegate(this, &SettingsWindow::onResolutionAccept);
|
|
|
|
|
dialog->eventCancelClicked.clear();
|
|
|
|
@ -535,7 +537,7 @@ namespace MWGui
|
|
|
|
|
_sender->setCaptionWithReplacing(_sender->getItemNameAt(_sender->getIndexSelected()));
|
|
|
|
|
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->interactiveMessageBox(
|
|
|
|
|
"#{OMWEngine:ChangeRequiresRestart}", { "#{sOK}" }, true);
|
|
|
|
|
"#{OMWEngine:ChangeRequiresRestart}", { "#{Interface:OK}" }, true);
|
|
|
|
|
|
|
|
|
|
Settings::Manager::setString("lighting method", "Shaders", *_sender->getItemDataAt<std::string>(pos));
|
|
|
|
|
apply();
|
|
|
|
@ -549,7 +551,7 @@ namespace MWGui
|
|
|
|
|
_sender->setCaptionWithReplacing(_sender->getItemNameAt(_sender->getIndexSelected()));
|
|
|
|
|
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->interactiveMessageBox(
|
|
|
|
|
"#{OMWEngine:ChangeRequiresRestart}", { "#{sOK}" }, true);
|
|
|
|
|
"#{OMWEngine:ChangeRequiresRestart}", { "#{Interface:OK}" }, true);
|
|
|
|
|
|
|
|
|
|
std::vector<std::string> currentLocales = Settings::Manager::getStringArray("preferred locales", "General");
|
|
|
|
|
if (currentLocales.size() <= langPriority)
|
|
|
|
@ -611,7 +613,7 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
void SettingsWindow::onLightsResetButtonClicked(MyGUI::Widget* _sender)
|
|
|
|
|
{
|
|
|
|
|
std::vector<std::string> buttons = { "#{sYes}", "#{sNo}" };
|
|
|
|
|
std::vector<std::string> buttons = { "#{Interface:Yes}", "#{Interface:No}" };
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->interactiveMessageBox(
|
|
|
|
|
"#{OMWEngine:LightingResetToDefaults}", buttons, true);
|
|
|
|
|
int selectedButton = MWBase::Environment::get().getWindowManager()->readPressedButton();
|
|
|
|
@ -1014,9 +1016,9 @@ namespace MWGui
|
|
|
|
|
{
|
|
|
|
|
int actionId = *_sender->getUserData<int>();
|
|
|
|
|
|
|
|
|
|
_sender->castType<MyGUI::Button>()->setCaptionWithReplacing("#{sNone}");
|
|
|
|
|
_sender->castType<MyGUI::Button>()->setCaptionWithReplacing("#{Interface:None}");
|
|
|
|
|
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->staticMessageBox("#{sControlsMenu3}");
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->staticMessageBox("#{OMWEngine:RebindAction}");
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->disallowMouse();
|
|
|
|
|
|
|
|
|
|
MWBase::Environment::get().getInputManager()->enableDetectingBindingMode(actionId, mKeyboardMode);
|
|
|
|
@ -1034,7 +1036,7 @@ namespace MWGui
|
|
|
|
|
void SettingsWindow::onResetDefaultBindings(MyGUI::Widget* _sender)
|
|
|
|
|
{
|
|
|
|
|
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
|
|
|
|
|
dialog->askForConfirmation("#{sNotifyMessage66}");
|
|
|
|
|
dialog->askForConfirmation("#{OMWEngine:ConfirmResetBindings}");
|
|
|
|
|
dialog->eventOkClicked.clear();
|
|
|
|
|
dialog->eventOkClicked += MyGUI::newDelegate(this, &SettingsWindow::onResetDefaultBindingsAccept);
|
|
|
|
|
dialog->eventCancelClicked.clear();
|
|
|
|
|