mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 21:40:03 +00:00
Improve window mode change (feature #7087)
This commit is contained in:
parent
cdd6a8c007
commit
08f7554e38
@ -35,6 +35,7 @@
|
|||||||
Feature #6983: PCVisionBonus script functions
|
Feature #6983: PCVisionBonus script functions
|
||||||
Feature #6995: Localize the "show effect duration" option
|
Feature #6995: Localize the "show effect duration" option
|
||||||
Feature #7058: Implement TestModels (T3D) console command
|
Feature #7058: Implement TestModels (T3D) console command
|
||||||
|
Feature #7087: Block resolution change in the Windowed Fullscreen mode
|
||||||
|
|
||||||
0.48.0
|
0.48.0
|
||||||
------
|
------
|
||||||
|
@ -564,7 +564,18 @@ namespace MWGui
|
|||||||
if (pos == MyGUI::ITEM_NONE)
|
if (pos == MyGUI::ITEM_NONE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Settings::Manager::setInt("window mode", "Video", static_cast<int>(_sender->getIndexSelected()));
|
int index = static_cast<int>(_sender->getIndexSelected());
|
||||||
|
if (index == static_cast<size_t>(Settings::WindowMode::WindowedFullscreen))
|
||||||
|
mResolutionList->setEnabled(false);
|
||||||
|
else
|
||||||
|
mResolutionList->setEnabled(true);
|
||||||
|
|
||||||
|
if (index == static_cast<size_t>(Settings::WindowMode::Windowed))
|
||||||
|
mWindowBorderButton->setEnabled(true);
|
||||||
|
else
|
||||||
|
mWindowBorderButton->setEnabled(false);
|
||||||
|
|
||||||
|
Settings::Manager::setInt("window mode", "Video", index);
|
||||||
apply();
|
apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -644,6 +655,12 @@ namespace MWGui
|
|||||||
apply();
|
apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SettingsWindow::onResChange(int width, int height)
|
||||||
|
{
|
||||||
|
center();
|
||||||
|
highlightCurrentResolution();
|
||||||
|
}
|
||||||
|
|
||||||
void SettingsWindow::onSliderChangePosition(MyGUI::ScrollBar* scroller, size_t pos)
|
void SettingsWindow::onSliderChangePosition(MyGUI::ScrollBar* scroller, size_t pos)
|
||||||
{
|
{
|
||||||
if (getSettingType(scroller) == "Slider")
|
if (getSettingType(scroller) == "Slider")
|
||||||
@ -839,6 +856,9 @@ namespace MWGui
|
|||||||
|
|
||||||
mWindowBorderButton->setEnabled(false);
|
mWindowBorderButton->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (index == static_cast<size_t>(Settings::WindowMode::WindowedFullscreen))
|
||||||
|
mResolutionList->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsWindow::layoutControlsBox()
|
void SettingsWindow::layoutControlsBox()
|
||||||
|
@ -20,7 +20,7 @@ namespace MWGui
|
|||||||
|
|
||||||
void updateWindowModeSettings();
|
void updateWindowModeSettings();
|
||||||
|
|
||||||
void onResChange(int, int) override { center(); }
|
void onResChange(int, int) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
MyGUI::TabControl* mSettingsTab;
|
MyGUI::TabControl* mSettingsTab;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user