mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
make borderless setting available to the UI
This commit is contained in:
parent
ec18a2cfa0
commit
639fbfad0b
6 changed files with 31 additions and 5 deletions
|
@ -159,6 +159,9 @@ bool Launcher::GraphicsPage::loadSettings()
|
||||||
if (mGraphicsSettings.value(QString("Video/fullscreen")) == QLatin1String("true"))
|
if (mGraphicsSettings.value(QString("Video/fullscreen")) == QLatin1String("true"))
|
||||||
fullScreenCheckBox->setCheckState(Qt::Checked);
|
fullScreenCheckBox->setCheckState(Qt::Checked);
|
||||||
|
|
||||||
|
if (mGraphicsSettings.value(QString("Video/borderless")) == QLatin1String("true"))
|
||||||
|
borderlessCheckBox->setCheckState(Qt::Checked);
|
||||||
|
|
||||||
int aaIndex = antiAliasingComboBox->findText(mGraphicsSettings.value(QString("Video/antialiasing")));
|
int aaIndex = antiAliasingComboBox->findText(mGraphicsSettings.value(QString("Video/antialiasing")));
|
||||||
if (aaIndex != -1)
|
if (aaIndex != -1)
|
||||||
antiAliasingComboBox->setCurrentIndex(aaIndex);
|
antiAliasingComboBox->setCurrentIndex(aaIndex);
|
||||||
|
@ -193,6 +196,9 @@ void Launcher::GraphicsPage::saveSettings()
|
||||||
fullScreenCheckBox->checkState() ? mGraphicsSettings.setValue(QString("Video/fullscreen"), QString("true"))
|
fullScreenCheckBox->checkState() ? mGraphicsSettings.setValue(QString("Video/fullscreen"), QString("true"))
|
||||||
: mGraphicsSettings.setValue(QString("Video/fullscreen"), QString("false"));
|
: mGraphicsSettings.setValue(QString("Video/fullscreen"), QString("false"));
|
||||||
|
|
||||||
|
borderlessCheckBox->checkState() ? mGraphicsSettings.setValue(QString("Video/borderless"), QString("true"))
|
||||||
|
: mGraphicsSettings.setValue(QString("Video/borderless"), QString("false"));
|
||||||
|
|
||||||
mGraphicsSettings.setValue(QString("Video/antialiasing"), antiAliasingComboBox->currentText());
|
mGraphicsSettings.setValue(QString("Video/antialiasing"), antiAliasingComboBox->currentText());
|
||||||
mGraphicsSettings.setValue(QString("Video/render system"), rendererComboBox->currentText());
|
mGraphicsSettings.setValue(QString("Video/render system"), rendererComboBox->currentText());
|
||||||
|
|
||||||
|
|
|
@ -350,6 +350,7 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
|
||||||
|
|
||||||
OEngine::Render::WindowSettings windowSettings;
|
OEngine::Render::WindowSettings windowSettings;
|
||||||
windowSettings.fullscreen = settings.getBool("fullscreen", "Video");
|
windowSettings.fullscreen = settings.getBool("fullscreen", "Video");
|
||||||
|
windowSettings.borderless = settings.getBool("borderless", "Video");
|
||||||
windowSettings.window_x = settings.getInt("resolution x", "Video");
|
windowSettings.window_x = settings.getInt("resolution x", "Video");
|
||||||
windowSettings.window_y = settings.getInt("resolution y", "Video");
|
windowSettings.window_y = settings.getInt("resolution y", "Video");
|
||||||
windowSettings.screen = settings.getInt("screen", "Video");
|
windowSettings.screen = settings.getInt("screen", "Video");
|
||||||
|
|
|
@ -166,6 +166,7 @@ namespace MWGui
|
||||||
getWidget(mResolutionList, "ResolutionList");
|
getWidget(mResolutionList, "ResolutionList");
|
||||||
getWidget(mFullscreenButton, "FullscreenButton");
|
getWidget(mFullscreenButton, "FullscreenButton");
|
||||||
getWidget(mVSyncButton, "VSyncButton");
|
getWidget(mVSyncButton, "VSyncButton");
|
||||||
|
getWidget(mBorderlessButton, "BorderlessButton");
|
||||||
getWidget(mFPSButton, "FPSButton");
|
getWidget(mFPSButton, "FPSButton");
|
||||||
getWidget(mFOVSlider, "FOVSlider");
|
getWidget(mFOVSlider, "FOVSlider");
|
||||||
getWidget(mAnisotropySlider, "AnisotropySlider");
|
getWidget(mAnisotropySlider, "AnisotropySlider");
|
||||||
|
|
|
@ -28,6 +28,7 @@ namespace MWGui
|
||||||
MyGUI::ListBox* mResolutionList;
|
MyGUI::ListBox* mResolutionList;
|
||||||
MyGUI::Button* mFullscreenButton;
|
MyGUI::Button* mFullscreenButton;
|
||||||
MyGUI::Button* mVSyncButton;
|
MyGUI::Button* mVSyncButton;
|
||||||
|
MyGUI::Button* mBorderlessButton;
|
||||||
MyGUI::Button* mFPSButton;
|
MyGUI::Button* mFPSButton;
|
||||||
MyGUI::ScrollBar* mFOVSlider;
|
MyGUI::ScrollBar* mFOVSlider;
|
||||||
MyGUI::ScrollBar* mDifficultySlider;
|
MyGUI::ScrollBar* mDifficultySlider;
|
||||||
|
|
|
@ -239,6 +239,16 @@
|
||||||
<Property key="Caption" value="VSync"/>
|
<Property key="Caption" value="VSync"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
</Widget>
|
</Widget>
|
||||||
|
<Widget type="HBox" skin="" position="182 34 300 24">
|
||||||
|
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top" name="BorderlessButton">
|
||||||
|
<UserString key="SettingCategory" value="Video"/>
|
||||||
|
<UserString key="SettingName" value="borderless"/>
|
||||||
|
<UserString key="SettingType" value="CheckButton"/>
|
||||||
|
</Widget>
|
||||||
|
<Widget type="AutoSizedTextBox" skin="SandText" position="28 4 48 16" align="Left Top">
|
||||||
|
<Property key="Caption" value="Borderless"/>
|
||||||
|
</Widget>
|
||||||
|
</Widget>
|
||||||
<Widget type="HBox" skin="" position="182 64 300 24">
|
<Widget type="HBox" skin="" position="182 64 300 24">
|
||||||
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top" name="FPSButton"/>
|
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top" name="FPSButton"/>
|
||||||
<Widget type="AutoSizedTextBox" skin="SandText" position="28 4 32 16" align="Left Top">
|
<Widget type="AutoSizedTextBox" skin="SandText" position="28 4 32 16" align="Left Top">
|
||||||
|
|
|
@ -51,20 +51,27 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="borderlessCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Borderless</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="antiAliasingLabel">
|
<widget class="QLabel" name="antiAliasingLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Anti-aliasing:</string>
|
<string>Anti-aliasing:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="screenLabel">
|
<widget class="QLabel" name="screenLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Screen:</string>
|
<string>Screen:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="5" column="0">
|
||||||
<widget class="QLabel" name="resolutionLabel">
|
<widget class="QLabel" name="resolutionLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Resolution:</string>
|
<string>Resolution:</string>
|
||||||
|
@ -74,13 +81,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QComboBox" name="antiAliasingComboBox"/>
|
<widget class="QComboBox" name="antiAliasingComboBox"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QComboBox" name="screenComboBox"/>
|
<widget class="QComboBox" name="screenComboBox"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="5" column="1">
|
||||||
<layout class="QGridLayout" name="resolutionLayout">
|
<layout class="QGridLayout" name="resolutionLayout">
|
||||||
<item row="1" column="2">
|
<item row="1" column="2">
|
||||||
<layout class="QHBoxLayout" name="customResolutionLayout" stretch="1,0,1">
|
<layout class="QHBoxLayout" name="customResolutionLayout" stretch="1,0,1">
|
||||||
|
|
Loading…
Reference in a new issue