mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-05 06:40:09 +00:00
Merge branch 'moving_lighting_method_to_graphics' into 'master'
Moving Lighting Method from Advanced -> Visuals to Graphics -> Lighting See merge request OpenMW/openmw!883
This commit is contained in:
commit
3920477618
@ -136,13 +136,6 @@ bool Launcher::AdvancedPage::loadSettings()
|
||||
|
||||
loadSettingBool(activeGridObjectPagingCheckBox, "object paging active grid", "Terrain");
|
||||
viewingDistanceComboBox->setValue(convertToCells(Settings::Manager::getInt("viewing distance", "Camera")));
|
||||
|
||||
int lightingMethod = 1;
|
||||
if (Settings::Manager::getString("lighting method", "Shaders") == "legacy")
|
||||
lightingMethod = 0;
|
||||
else if (Settings::Manager::getString("lighting method", "Shaders") == "shaders")
|
||||
lightingMethod = 2;
|
||||
lightingMethodComboBox->setCurrentIndex(lightingMethod);
|
||||
}
|
||||
|
||||
// Audio
|
||||
@ -294,9 +287,6 @@ void Launcher::AdvancedPage::saveSettings()
|
||||
{
|
||||
Settings::Manager::setInt("viewing distance", "Camera", convertToUnits(viewingDistance));
|
||||
}
|
||||
|
||||
static std::array<std::string, 3> lightingMethodMap = {"legacy", "shaders compatibility", "shaders"};
|
||||
Settings::Manager::setString("lighting method", "Shaders", lightingMethodMap[lightingMethodComboBox->currentIndex()]);
|
||||
}
|
||||
|
||||
// Audio
|
||||
|
@ -92,6 +92,7 @@ bool Launcher::GraphicsPage::loadSettings()
|
||||
if (!setupSDL())
|
||||
return false;
|
||||
|
||||
// Visuals
|
||||
if (Settings::Manager::getBool("vsync", "Video"))
|
||||
vSyncCheckBox->setCheckState(Qt::Checked);
|
||||
|
||||
@ -131,6 +132,15 @@ bool Launcher::GraphicsPage::loadSettings()
|
||||
framerateLimitSpinBox->setValue(fpsLimit);
|
||||
}
|
||||
|
||||
// Lighting
|
||||
int lightingMethod = 1;
|
||||
if (Settings::Manager::getString("lighting method", "Shaders") == "legacy")
|
||||
lightingMethod = 0;
|
||||
else if (Settings::Manager::getString("lighting method", "Shaders") == "shaders")
|
||||
lightingMethod = 2;
|
||||
lightingMethodComboBox->setCurrentIndex(lightingMethod);
|
||||
|
||||
// Shadows
|
||||
if (Settings::Manager::getBool("actor shadows", "Shadows"))
|
||||
actorShadowsCheckBox->setCheckState(Qt::Checked);
|
||||
if (Settings::Manager::getBool("player shadows", "Shadows"))
|
||||
@ -167,6 +177,8 @@ bool Launcher::GraphicsPage::loadSettings()
|
||||
|
||||
void Launcher::GraphicsPage::saveSettings()
|
||||
{
|
||||
// Visuals
|
||||
|
||||
// Ensure we only set the new settings if they changed. This is to avoid cluttering the
|
||||
// user settings file (which by definition should only contain settings the user has touched)
|
||||
bool cVSync = vSyncCheckBox->checkState();
|
||||
@ -219,6 +231,11 @@ void Launcher::GraphicsPage::saveSettings()
|
||||
Settings::Manager::setFloat("framerate limit", "Video", 0);
|
||||
}
|
||||
|
||||
// Lighting
|
||||
static std::array<std::string, 3> lightingMethodMap = {"legacy", "shaders compatibility", "shaders"};
|
||||
Settings::Manager::setString("lighting method", "Shaders", lightingMethodMap[lightingMethodComboBox->currentIndex()]);
|
||||
|
||||
// Shadows
|
||||
int cShadowDist = shadowDistanceCheckBox->checkState() != Qt::Unchecked ? shadowDistanceSpinBox->value() : 0;
|
||||
if (Settings::Manager::getInt("maximum shadow map distance", "Shadows") != cShadowDist)
|
||||
Settings::Manager::setInt("maximum shadow map distance", "Shadows", cShadowDist);
|
||||
|
@ -444,36 +444,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout" name="lightingMethodLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="lightingMethodLabel">
|
||||
<property name="text">
|
||||
<string>Lighting Method:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="lightingMethodComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>legacy</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>shaders compatibility</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>shaders</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -187,6 +187,56 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="LightingWrapper">
|
||||
<attribute name="title">
|
||||
<string>Lighting</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="lightingLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="lightingMethodLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="lightingMethodLabel">
|
||||
<property name="text">
|
||||
<string>Lighting Method:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="lightingMethodComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>legacy</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>shaders compatibility</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>shaders</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="ShadowWrapper">
|
||||
<attribute name="title">
|
||||
<string>Shadows</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user