mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 15:15:31 +00:00
Merge remote-tracking branch 'swick/master'
This commit is contained in:
commit
2fa0764c89
10 changed files with 50 additions and 8 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/window border")) == QLatin1String("true"))
|
||||||
|
windowBorderCheckBox->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"));
|
||||||
|
|
||||||
|
windowBorderCheckBox->checkState() ? mGraphicsSettings.setValue(QString("Video/window border"), QString("true"))
|
||||||
|
: mGraphicsSettings.setValue(QString("Video/window border"), 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());
|
||||||
|
|
||||||
|
@ -331,10 +337,12 @@ void Launcher::GraphicsPage::slotFullScreenChanged(int state)
|
||||||
customRadioButton->setEnabled(false);
|
customRadioButton->setEnabled(false);
|
||||||
customWidthSpinBox->setEnabled(false);
|
customWidthSpinBox->setEnabled(false);
|
||||||
customHeightSpinBox->setEnabled(false);
|
customHeightSpinBox->setEnabled(false);
|
||||||
|
windowBorderCheckBox->setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
customRadioButton->setEnabled(true);
|
customRadioButton->setEnabled(true);
|
||||||
customWidthSpinBox->setEnabled(true);
|
customWidthSpinBox->setEnabled(true);
|
||||||
customHeightSpinBox->setEnabled(true);
|
customHeightSpinBox->setEnabled(true);
|
||||||
|
windowBorderCheckBox->setEnabled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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.window_border = settings.getBool("window border", "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(mWindowBorderButton, "WindowBorderButton");
|
||||||
getWidget(mFPSButton, "FPSButton");
|
getWidget(mFPSButton, "FPSButton");
|
||||||
getWidget(mFOVSlider, "FOVSlider");
|
getWidget(mFOVSlider, "FOVSlider");
|
||||||
getWidget(mAnisotropySlider, "AnisotropySlider");
|
getWidget(mAnisotropySlider, "AnisotropySlider");
|
||||||
|
@ -239,6 +240,8 @@ namespace MWGui
|
||||||
MyGUI::TextBox* diffText;
|
MyGUI::TextBox* diffText;
|
||||||
getWidget(diffText, "DifficultyText");
|
getWidget(diffText, "DifficultyText");
|
||||||
diffText->setCaptionWithReplacing("#{sDifficulty} (" + boost::lexical_cast<std::string>(int(Settings::Manager::getInt("difficulty", "Game"))) + ")");
|
diffText->setCaptionWithReplacing("#{sDifficulty} (" + boost::lexical_cast<std::string>(int(Settings::Manager::getInt("difficulty", "Game"))) + ")");
|
||||||
|
|
||||||
|
mWindowBorderButton->setEnabled(!Settings::Manager::getBool("fullscreen", "Video"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsWindow::onOkButtonClicked(MyGUI::Widget* _sender)
|
void SettingsWindow::onOkButtonClicked(MyGUI::Widget* _sender)
|
||||||
|
@ -354,6 +357,8 @@ namespace MWGui
|
||||||
_sender->castType<MyGUI::Button>()->setCaption(off);
|
_sender->castType<MyGUI::Button>()->setCaption(off);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mWindowBorderButton->setEnabled(!newState);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getSettingType(_sender) == checkButtonType)
|
if (getSettingType(_sender) == checkButtonType)
|
||||||
|
|
|
@ -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* mWindowBorderButton;
|
||||||
MyGUI::Button* mFPSButton;
|
MyGUI::Button* mFPSButton;
|
||||||
MyGUI::ScrollBar* mFOVSlider;
|
MyGUI::ScrollBar* mFOVSlider;
|
||||||
MyGUI::ScrollBar* mDifficultySlider;
|
MyGUI::ScrollBar* mDifficultySlider;
|
||||||
|
|
|
@ -753,6 +753,8 @@ void RenderingManager::processChangedSettings(const Settings::CategorySettingVec
|
||||||
|| it->second == "resolution y"
|
|| it->second == "resolution y"
|
||||||
|| it->second == "fullscreen"))
|
|| it->second == "fullscreen"))
|
||||||
changeRes = true;
|
changeRes = true;
|
||||||
|
else if (it->first == "Video" && it->second == "window border")
|
||||||
|
changeRes = true;
|
||||||
else if (it->second == "field of view" && it->first == "General")
|
else if (it->second == "field of view" && it->first == "General")
|
||||||
mRendering.setFov(Settings::Manager::getFloat("field of view", "General"));
|
mRendering.setFov(Settings::Manager::getFloat("field of view", "General"));
|
||||||
else if ((it->second == "texture filtering" && it->first == "General")
|
else if ((it->second == "texture filtering" && it->first == "General")
|
||||||
|
@ -810,6 +812,7 @@ void RenderingManager::processChangedSettings(const Settings::CategorySettingVec
|
||||||
unsigned int x = Settings::Manager::getInt("resolution x", "Video");
|
unsigned int x = Settings::Manager::getInt("resolution x", "Video");
|
||||||
unsigned int y = Settings::Manager::getInt("resolution y", "Video");
|
unsigned int y = Settings::Manager::getInt("resolution y", "Video");
|
||||||
bool fullscreen = Settings::Manager::getBool("fullscreen", "Video");
|
bool fullscreen = Settings::Manager::getBool("fullscreen", "Video");
|
||||||
|
bool windowBorder = Settings::Manager::getBool("window border", "Video");
|
||||||
|
|
||||||
SDL_Window* window = mRendering.getSDLWindow();
|
SDL_Window* window = mRendering.getSDLWindow();
|
||||||
|
|
||||||
|
@ -828,7 +831,10 @@ void RenderingManager::processChangedSettings(const Settings::CategorySettingVec
|
||||||
SDL_SetWindowFullscreen(window, fullscreen);
|
SDL_SetWindowFullscreen(window, fullscreen);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
SDL_SetWindowSize(window, x, y);
|
SDL_SetWindowSize(window, x, y);
|
||||||
|
SDL_SetWindowBordered(window, windowBorder ? SDL_TRUE : SDL_FALSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mWater->processChangedSettings(settings);
|
mWater->processChangedSettings(settings);
|
||||||
|
|
|
@ -240,12 +240,22 @@
|
||||||
</Widget>
|
</Widget>
|
||||||
</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="WindowBorderButton">
|
||||||
|
<UserString key="SettingCategory" value="Video"/>
|
||||||
|
<UserString key="SettingName" value="window border"/>
|
||||||
|
<UserString key="SettingType" value="CheckButton"/>
|
||||||
|
</Widget>
|
||||||
|
<Widget type="AutoSizedTextBox" skin="SandText" position="28 4 48 16" align="Left Top">
|
||||||
|
<Property key="Caption" value="Window border"/>
|
||||||
|
</Widget>
|
||||||
|
</Widget>
|
||||||
|
<Widget type="HBox" skin="" position="182 94 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">
|
||||||
<Property key="Caption" value="FPS"/>
|
<Property key="Caption" value="FPS"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
</Widget>
|
</Widget>
|
||||||
<Widget type="HBox" skin="" position="182 94 300 24">
|
<Widget type="HBox" skin="" position="182 124 300 24">
|
||||||
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top" name="ShadersButton">
|
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top" name="ShadersButton">
|
||||||
<UserString key="SettingCategory" value="Objects"/>
|
<UserString key="SettingCategory" value="Objects"/>
|
||||||
<UserString key="SettingName" value="shaders"/>
|
<UserString key="SettingName" value="shaders"/>
|
||||||
|
@ -255,7 +265,7 @@
|
||||||
<Property key="Caption" value="Object shaders"/>
|
<Property key="Caption" value="Object shaders"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
</Widget>
|
</Widget>
|
||||||
<Widget type="HBox" skin="" position="182 124 300 24">
|
<Widget type="HBox" skin="" position="182 154 300 24">
|
||||||
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top" name="ShaderModeButton"/>
|
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top" name="ShaderModeButton"/>
|
||||||
<Widget type="AutoSizedTextBox" skin="SandText" position="28 4 93 16" align="Left Top">
|
<Widget type="AutoSizedTextBox" skin="SandText" position="28 4 93 16" align="Left Top">
|
||||||
<Property key="Caption" value="Shader mode"/>
|
<Property key="Caption" value="Shader mode"/>
|
||||||
|
|
|
@ -6,6 +6,7 @@ resolution x = 800
|
||||||
resolution y = 600
|
resolution y = 600
|
||||||
|
|
||||||
fullscreen = false
|
fullscreen = false
|
||||||
|
window border = true
|
||||||
screen = 0
|
screen = 0
|
||||||
|
|
||||||
# Minimize the window if it loses key focus?
|
# Minimize the window if it loses key focus?
|
||||||
|
|
|
@ -51,20 +51,27 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="windowBorderCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Window border</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">
|
||||||
|
|
|
@ -128,7 +128,9 @@ void OgreRenderer::createWindow(const std::string &title, const WindowSettings&
|
||||||
settings.window_x, // width, in pixels
|
settings.window_x, // width, in pixels
|
||||||
settings.window_y, // height, in pixels
|
settings.window_y, // height, in pixels
|
||||||
SDL_WINDOW_SHOWN
|
SDL_WINDOW_SHOWN
|
||||||
| (settings.fullscreen ? SDL_WINDOW_FULLSCREEN : 0) | SDL_WINDOW_RESIZABLE
|
| SDL_WINDOW_RESIZABLE
|
||||||
|
| (settings.fullscreen ? SDL_WINDOW_FULLSCREEN : 0)
|
||||||
|
| (settings.window_border ? 0 : SDL_WINDOW_BORDERLESS)
|
||||||
);
|
);
|
||||||
|
|
||||||
SFO::SDLWindowHelper helper(mSDLWindow, settings.window_x, settings.window_y, title, settings.fullscreen, params);
|
SFO::SDLWindowHelper helper(mSDLWindow, settings.window_x, settings.window_y, title, settings.fullscreen, params);
|
||||||
|
|
|
@ -37,6 +37,7 @@ namespace OEngine
|
||||||
{
|
{
|
||||||
bool vsync;
|
bool vsync;
|
||||||
bool fullscreen;
|
bool fullscreen;
|
||||||
|
bool window_border;
|
||||||
int window_x, window_y;
|
int window_x, window_y;
|
||||||
int screen;
|
int screen;
|
||||||
std::string fsaa;
|
std::string fsaa;
|
||||||
|
|
Loading…
Reference in a new issue