Add DOF checkbox to the graphics options
This commit is contained in:
parent
2d34bd0f47
commit
423a833bb8
@ -124,13 +124,12 @@
|
||||
</div>
|
||||
|
||||
<spacer height="4" width="10" />
|
||||
<!--
|
||||
|
||||
<div layout="horizontal-row" proportion="1" height="fit">
|
||||
<checkbox id="anim_gfx"/>
|
||||
<checkbox id="dof"/>
|
||||
<spacer width="10" height="10"/>
|
||||
<label text="Animated Scenery" I18N="Video settings"/>
|
||||
<label text="Depth of field" I18N="Video settings"/>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
|
||||
<spacer height="20" width="10" />
|
||||
|
@ -52,6 +52,7 @@ void CustomVideoSettingsDialog::beforeAddingWidgets()
|
||||
getWidget<CheckBoxWidget>("anim_gfx")->setState( UserConfigParams::m_graphical_effects );
|
||||
getWidget<CheckBoxWidget>("weather_gfx")->setState( UserConfigParams::m_weather_effects );
|
||||
getWidget<CheckBoxWidget>("ubo")->setState(!UserConfigParams::m_ubo_disabled);
|
||||
getWidget<CheckBoxWidget>("dof")->setState(UserConfigParams::m_dof);
|
||||
|
||||
SpinnerWidget* kart_anim = getWidget<SpinnerWidget>("steering_animations");
|
||||
kart_anim->addLabel( _("Disabled") ); // 0
|
||||
@ -102,12 +103,14 @@ GUIEngine::EventPropagation CustomVideoSettingsDialog::processEvent(const std::s
|
||||
bool dynamic_light = getWidget<CheckBoxWidget>("dynamiclight")->getState();
|
||||
UserConfigParams::m_dynamic_lights = dynamic_light;
|
||||
|
||||
UserConfigParams::m_graphical_effects =
|
||||
UserConfigParams::m_graphical_effects =
|
||||
getWidget<CheckBoxWidget>("anim_gfx")->getState();
|
||||
UserConfigParams::m_weather_effects =
|
||||
UserConfigParams::m_weather_effects =
|
||||
getWidget<CheckBoxWidget>("weather_gfx")->getState();
|
||||
UserConfigParams::m_ubo_disabled =
|
||||
!getWidget<CheckBoxWidget>("ubo")->getState();
|
||||
UserConfigParams::m_dof =
|
||||
getWidget<CheckBoxWidget>("dof")->getState();
|
||||
|
||||
UserConfigParams::m_motionblur =
|
||||
getWidget<CheckBoxWidget>("motionblur")->getState();
|
||||
|
@ -59,6 +59,8 @@ struct GFXPreset
|
||||
bool animatedScenery;
|
||||
int animatedCharacters;
|
||||
int anisotropy;
|
||||
/** Depth of field */
|
||||
bool dof;
|
||||
};
|
||||
|
||||
static GFXPreset GFX_PRESETS[] =
|
||||
@ -66,31 +68,31 @@ static GFXPreset GFX_PRESETS[] =
|
||||
{
|
||||
false /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
||||
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, false /* weather */,
|
||||
false /* animatedScenery */, 0 /* animatedCharacters */, 0 /* anisotropy */
|
||||
false /* animatedScenery */, 0 /* animatedCharacters */, 0 /* anisotropy */, false /* depth of field */
|
||||
},
|
||||
|
||||
{
|
||||
false /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
||||
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, false /* weather */,
|
||||
true /* animatedScenery */, 1 /* animatedCharacters */, 4 /* anisotropy */
|
||||
true /* animatedScenery */, 1 /* animatedCharacters */, 4 /* anisotropy */, false /* depth of field */
|
||||
},
|
||||
|
||||
{
|
||||
true /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
||||
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, true /* weather */,
|
||||
true /* animatedScenery */, 1 /* animatedCharacters */, 4 /* anisotropy */
|
||||
true /* animatedScenery */, 1 /* animatedCharacters */, 4 /* anisotropy */, false /* depth of field */
|
||||
},
|
||||
|
||||
{
|
||||
true /* light */, 0 /* shadow */, false /* bloom */, true /* motionblur */,
|
||||
true /* lightshaft */, true /* glow */, true /* mlaa */, false /* ssao */, true /* weather */,
|
||||
true /* animatedScenery */, 1 /* animatedCharacters */, 8 /* anisotropy */
|
||||
true /* animatedScenery */, 1 /* animatedCharacters */, 8 /* anisotropy */, false /* depth of field */
|
||||
},
|
||||
|
||||
{
|
||||
true /* light */, 2 /* shadow */, true /* bloom */, true /* motionblur */,
|
||||
true /* lightshaft */, true /* glow */, true /* mlaa */, true /* ssao */, true /* weather */,
|
||||
true /* animatedScenery */, 2 /* animatedCharacters */, 8 /* anisotropy */
|
||||
true /* animatedScenery */, 2 /* animatedCharacters */, 8 /* anisotropy */, true /* depth of field */
|
||||
}
|
||||
};
|
||||
|
||||
@ -359,7 +361,8 @@ void OptionsScreenVideo::updateGfxSlider()
|
||||
//GFX_PRESETS[l].shaders == UserConfigParams::m_pixel_shaders
|
||||
GFX_PRESETS[l].shadows == UserConfigParams::m_shadows &&
|
||||
GFX_PRESETS[l].ssao == UserConfigParams::m_ssao &&
|
||||
GFX_PRESETS[l].weather == UserConfigParams::m_weather_effects)
|
||||
GFX_PRESETS[l].weather == UserConfigParams::m_weather_effects &&
|
||||
GFX_PRESETS[l].dof == UserConfigParams::m_dof)
|
||||
{
|
||||
gfx->setValue(l + 1);
|
||||
found = true;
|
||||
@ -523,6 +526,7 @@ void OptionsScreenVideo::eventCallback(Widget* widget, const std::string& name,
|
||||
UserConfigParams::m_shadows = GFX_PRESETS[level].shadows;
|
||||
UserConfigParams::m_ssao = GFX_PRESETS[level].ssao;
|
||||
UserConfigParams::m_weather_effects = GFX_PRESETS[level].weather;
|
||||
UserConfigParams::m_dof = GFX_PRESETS[level].dof;
|
||||
|
||||
updateGfxSlider();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user