make borderless setting available to the UI

pull/410/head
Sebastian Wick 10 years ago
parent ec18a2cfa0
commit 639fbfad0b

@ -159,6 +159,9 @@ bool Launcher::GraphicsPage::loadSettings()
if (mGraphicsSettings.value(QString("Video/fullscreen")) == QLatin1String("true"))
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")));
if (aaIndex != -1)
antiAliasingComboBox->setCurrentIndex(aaIndex);
@ -193,6 +196,9 @@ void Launcher::GraphicsPage::saveSettings()
fullScreenCheckBox->checkState() ? mGraphicsSettings.setValue(QString("Video/fullscreen"), QString("true"))
: 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/render system"), rendererComboBox->currentText());

@ -350,6 +350,7 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
OEngine::Render::WindowSettings windowSettings;
windowSettings.fullscreen = settings.getBool("fullscreen", "Video");
windowSettings.borderless = settings.getBool("borderless", "Video");
windowSettings.window_x = settings.getInt("resolution x", "Video");
windowSettings.window_y = settings.getInt("resolution y", "Video");
windowSettings.screen = settings.getInt("screen", "Video");

@ -166,6 +166,7 @@ namespace MWGui
getWidget(mResolutionList, "ResolutionList");
getWidget(mFullscreenButton, "FullscreenButton");
getWidget(mVSyncButton, "VSyncButton");
getWidget(mBorderlessButton, "BorderlessButton");
getWidget(mFPSButton, "FPSButton");
getWidget(mFOVSlider, "FOVSlider");
getWidget(mAnisotropySlider, "AnisotropySlider");

@ -28,6 +28,7 @@ namespace MWGui
MyGUI::ListBox* mResolutionList;
MyGUI::Button* mFullscreenButton;
MyGUI::Button* mVSyncButton;
MyGUI::Button* mBorderlessButton;
MyGUI::Button* mFPSButton;
MyGUI::ScrollBar* mFOVSlider;
MyGUI::ScrollBar* mDifficultySlider;

@ -239,6 +239,16 @@
<Property key="Caption" value="VSync"/>
</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="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">

@ -51,20 +51,27 @@
</widget>
</item>
<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">
<property name="text">
<string>Anti-aliasing:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QLabel" name="screenLabel">
<property name="text">
<string>Screen:</string>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="5" column="0">
<widget class="QLabel" name="resolutionLabel">
<property name="text">
<string>Resolution:</string>
@ -74,13 +81,13 @@
</property>
</widget>
</item>
<item row="2" column="1">
<item row="3" column="1">
<widget class="QComboBox" name="antiAliasingComboBox"/>
</item>
<item row="3" column="1">
<item row="4" column="1">
<widget class="QComboBox" name="screenComboBox"/>
</item>
<item row="4" column="1">
<item row="5" column="1">
<layout class="QGridLayout" name="resolutionLayout">
<item row="1" column="2">
<layout class="QHBoxLayout" name="customResolutionLayout" stretch="1,0,1">

Loading…
Cancel
Save