diff --git a/CHANGELOG.md b/CHANGELOG.md index 55f2185763..67a3823e6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ Feature #6983: PCVisionBonus script functions Feature #6995: Localize the "show effect duration" option Feature #7058: Implement TestModels (T3D) console command + Feature #7087: Block resolution change in the Windowed Fullscreen mode 0.48.0 ------ diff --git a/apps/openmw/mwgui/settingswindow.cpp b/apps/openmw/mwgui/settingswindow.cpp index bc2d9a2d78..c06eb7ef7e 100644 --- a/apps/openmw/mwgui/settingswindow.cpp +++ b/apps/openmw/mwgui/settingswindow.cpp @@ -267,6 +267,7 @@ namespace MWGui getWidget(mWaterRainRippleDetail, "WaterRainRippleDetail"); getWidget(mPrimaryLanguage, "PrimaryLanguage"); getWidget(mSecondaryLanguage, "SecondaryLanguage"); + getWidget(mWindowModeHint, "WindowModeHint"); getWidget(mLightingMethodButton, "LightingMethodButton"); getWidget(mLightsResetButton, "LightsResetButton"); getWidget(mMaxLights, "MaxLights"); @@ -379,6 +380,8 @@ namespace MWGui mWindowBorderButton->setEnabled( windowMode != Settings::WindowMode::Fullscreen && windowMode != Settings::WindowMode::WindowedFullscreen); + mWindowModeHint->setVisible(windowMode == Settings::WindowMode::WindowedFullscreen); + mKeyboardSwitch->setStateSelected(true); mControllerSwitch->setStateSelected(false); @@ -564,7 +567,24 @@ namespace MWGui if (pos == MyGUI::ITEM_NONE) return; - Settings::Manager::setInt("window mode", "Video", static_cast(_sender->getIndexSelected())); + int index = static_cast(_sender->getIndexSelected()); + if (index == static_cast(Settings::WindowMode::WindowedFullscreen)) + { + mResolutionList->setEnabled(false); + mWindowModeHint->setVisible(true); + } + else + { + mResolutionList->setEnabled(true); + mWindowModeHint->setVisible(false); + } + + if (index == static_cast(Settings::WindowMode::Windowed)) + mWindowBorderButton->setEnabled(true); + else + mWindowBorderButton->setEnabled(false); + + Settings::Manager::setInt("window mode", "Video", index); apply(); } @@ -644,6 +664,12 @@ namespace MWGui apply(); } + void SettingsWindow::onResChange(int width, int height) + { + center(); + highlightCurrentResolution(); + } + void SettingsWindow::onSliderChangePosition(MyGUI::ScrollBar* scroller, size_t pos) { if (getSettingType(scroller) == "Slider") @@ -839,6 +865,9 @@ namespace MWGui mWindowBorderButton->setEnabled(false); } + + if (index == static_cast(Settings::WindowMode::WindowedFullscreen)) + mResolutionList->setEnabled(false); } void SettingsWindow::layoutControlsBox() diff --git a/apps/openmw/mwgui/settingswindow.hpp b/apps/openmw/mwgui/settingswindow.hpp index 576ba2c627..f75e911633 100644 --- a/apps/openmw/mwgui/settingswindow.hpp +++ b/apps/openmw/mwgui/settingswindow.hpp @@ -20,7 +20,7 @@ namespace MWGui void updateWindowModeSettings(); - void onResChange(int, int) override { center(); } + void onResChange(int, int) override; protected: MyGUI::TabControl* mSettingsTab; @@ -43,6 +43,8 @@ namespace MWGui MyGUI::ComboBox* mPrimaryLanguage; MyGUI::ComboBox* mSecondaryLanguage; + MyGUI::Widget* mWindowModeHint; + // controls MyGUI::ScrollView* mControlsBox; MyGUI::Button* mResetControlsButton; diff --git a/files/data/l10n/SettingsMenu/en.yaml b/files/data/l10n/SettingsMenu/en.yaml index 3af577967e..fea8ae78b7 100644 --- a/files/data/l10n/SettingsMenu/en.yaml +++ b/files/data/l10n/SettingsMenu/en.yaml @@ -62,5 +62,6 @@ WaterShaderTextureQuality: "Texture quality" WindowBorder: "Window Border" WindowMode: "Window Mode" WindowModeFullscreen: "Fullscreen" +WindowModeHint: "Hint: the Windowed Fullscreen mode\nalways uses a native screen resolution." WindowModeWindowed: "Windowed" WindowModeWindowedFullscreen: "Windowed Fullscreen" diff --git a/files/data/l10n/SettingsMenu/ru.yaml b/files/data/l10n/SettingsMenu/ru.yaml index 422b00750f..fc9760c3d6 100644 --- a/files/data/l10n/SettingsMenu/ru.yaml +++ b/files/data/l10n/SettingsMenu/ru.yaml @@ -62,5 +62,6 @@ WaterShaderTextureQuality: "Качество текстуры воды" WindowBorder: "Рамка окна" WindowMode: "Режим окна" WindowModeFullscreen: "Полный экран" +WindowModeHint: "Подсказка: режим Оконный без полей\nвсегда использует родное разрешение экрана." WindowModeWindowed: "Оконный" WindowModeWindowedFullscreen: "Оконный без полей" diff --git a/files/data/mygui/openmw_settings_window.layout b/files/data/mygui/openmw_settings_window.layout index 9042a13546..0569751191 100644 --- a/files/data/mygui/openmw_settings_window.layout +++ b/files/data/mygui/openmw_settings_window.layout @@ -275,7 +275,7 @@ - + @@ -323,10 +323,13 @@ - - + + - + + + + @@ -338,18 +341,18 @@ - + - + - + - + @@ -359,11 +362,11 @@ - + - +