Skip to content

Commit

Permalink
Order the effects & etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingJellyfish committed Feb 4, 2025
1 parent 337b8dd commit 7c09862
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 51 deletions.
50 changes: 25 additions & 25 deletions data/gui/dialogs/custom_video_settings.stkgui
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@
<spacer width="70" height="10"/>

<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="bloom"/>
<checkbox id="mlaa"/>
<spacer width="10" height="10"/>
<label text="Bloom" I18N="Video settings"/>
<label text="Anti-aliasing" I18N="Video settings"/>
</div>

<spacer height="4" width="10" />

<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="lightshaft"/>
<checkbox id="lightscattering"/>
<spacer width="10" height="10"/>
<label text="Light shaft (God rays)" I18N="Video settings"/>
<label text="Light Scattering" I18N="Video settings"/>
</div>
</div>

Expand All @@ -59,77 +59,77 @@
<spacer width="70" height="10"/>

<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="ssao"/>
<checkbox id="glow"/>
<spacer width="10" height="10"/>
<label text="Ambient occlusion" I18N="Video settings"/>
<label text="Glow (Outlines)" I18N="Video settings"/>
</div>

<spacer height="4" width="10" />

<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="dof"/>
<checkbox id="lightshaft"/>
<spacer width="10" height="10"/>
<label text="Depth of field" I18N="Video settings"/>
<label text="Light shaft (God rays)" I18N="Video settings"/>
</div>
</div>

<spacer height="4" width="10" />

<div layout="horizontal-row" width="100%" proportion="1">
<spacer width="70" height="10"/>

<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="glow"/>
<checkbox id="ibl"/>
<spacer width="10" height="10"/>
<label text="Glow (Outlines)" I18N="Video settings"/>
<label text="Image-based lighting" I18N="Video settings"/>
</div>

<spacer height="4" width="10" />

<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="mlaa"/>
<checkbox id="bloom"/>
<spacer width="10" height="10"/>
<label text="Anti-aliasing" I18N="Video settings"/>
<label text="Bloom" I18N="Video settings"/>
</div>
</div>

<spacer height="4" width="10" />

<div layout="horizontal-row" width="100%" proportion="1">
<spacer width="70" height="10"/>

<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="motionblur"/>
<checkbox id="ssao"/>
<spacer width="10" height="10"/>
<label text="Motion blur" I18N="Video settings"/>
<label text="Ambient occlusion" I18N="Video settings"/>
</div>

<spacer height="4" width="10" />

<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="ibl"/>
<checkbox id="pcss"/>
<spacer width="10" height="10"/>
<label text="Image-based lighting" I18N="Video settings"/>
<label text="Soft shadows" I18N="Video settings"/>
</div>
</div>

<spacer height="4" width="10" />

<div layout="horizontal-row" width="100%" proportion="1">
<spacer width="70" height="10"/>

<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="lightscattering"/>
<checkbox id="motionblur"/>
<spacer width="10" height="10"/>
<label text="Light Scattering" I18N="Video settings"/>
<label text="Motion blur" I18N="Video settings"/>
</div>

<spacer height="4" width="10" />

<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="pcss"/>
<checkbox id="dof"/>
<spacer width="10" height="10"/>
<label text="Soft shadows" I18N="Video settings"/>
<label text="Depth of field" I18N="Video settings"/>
</div>
</div>

Expand Down Expand Up @@ -175,7 +175,7 @@
<gauge id="geometry_detail" min_value="0" max_value="5" width="50%" />
</div>

<spacer height="10" width="10" />
<spacer height="10" width="10"/>

<buttonbar id="buttons" height="15%" width="30%" align="center">
<icon-button id="cancel" width="128" height="128" icon="gui/icons/red_x.png"
Expand All @@ -184,4 +184,4 @@
I18N="Video settings" text="Apply" align="center"/>
</buttonbar>
</div>
</stkgui>
</stkgui>
2 changes: 1 addition & 1 deletion src/config/user_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ namespace UserConfigParams
PARAM_PREFIX BoolUserConfigParam m_pcss
PARAM_DEFAULT(BoolUserConfigParam(false,
"pcss", &m_graphics_quality,
"Enable Percentage Filtered Soft Shadows (needs high shadow resolution)") );
"Enable Percentage Closer Soft Shadows (needs high shadow resolution)") );
PARAM_PREFIX IntUserConfigParam m_shadows_resolution
PARAM_DEFAULT( IntUserConfigParam(0,
"shadows_resolution", &m_graphics_quality,
Expand Down
7 changes: 6 additions & 1 deletion src/states_screens/dialogs/custom_video_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@ GUIEngine::EventPropagation CustomVideoSettingsDialog::processEvent(const std::s
{
updateActivation();
}
else if (eventSource == "shadows")
{
updateActivation();
}
#endif
return GUIEngine::EVENT_LET;
} // processEvent
Expand All @@ -245,6 +249,7 @@ void CustomVideoSettingsDialog::updateActivation()
{
#ifndef SERVER_ONLY
bool light = getWidget<CheckBoxWidget>("dynamiclight")->getState();
bool shadows = getWidget<SpinnerWidget>("shadows")->getValue();
if (!CVS->isGLSL())
{
getWidget<CheckBoxWidget>("dynamiclight")->setActive(false);
Expand All @@ -262,6 +267,6 @@ void CustomVideoSettingsDialog::updateActivation()
getWidget<CheckBoxWidget>("glow")->setActive(light);
getWidget<CheckBoxWidget>("bloom")->setActive(light);
getWidget<CheckBoxWidget>("lightscattering")->setActive(light);
getWidget<CheckBoxWidget>("pcss")->setActive(light);
getWidget<CheckBoxWidget>("pcss")->setActive(light & shadows);
#endif
} // updateActivation
49 changes: 25 additions & 24 deletions src/states_screens/options/options_screen_video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,45 +470,46 @@ void OptionsScreenVideo::updateTooltip()
const core::stringw very_high = _("Very High");
//I18N: in the graphical options tooltip;
const core::stringw ultra = _("Ultra");

//I18N: in graphical options
tooltip = _("Particles Effects: %s",
UserConfigParams::m_particles_effects == 2 ? enabled :
UserConfigParams::m_particles_effects == 1 ? important_only :
disabled);
tooltip = _("Dynamic lights: %s",
UserConfigParams::m_dynamic_lights ? enabled : disabled);

//I18N: in graphical options
tooltip = tooltip + L"\n" + _("Animated Characters: %s",
UserConfigParams::m_animated_characters ? enabled : disabled);
if (UserConfigParams::m_shadows_resolution == 0)
tooltip = tooltip + L"\n" + _("Shadows: %s", disabled);
else
tooltip = tooltip + L"\n" + _("Shadows: %i", UserConfigParams::m_shadows_resolution);
//I18N: in graphical options
tooltip = tooltip + L"\n" + _("Dynamic lights: %s",
UserConfigParams::m_dynamic_lights ? enabled : disabled);
tooltip = tooltip + L"\n" + _("Anti-aliasing: %s",
UserConfigParams::m_mlaa ? enabled : disabled);
//I18N: in graphical options
tooltip = tooltip + L"\n" + _("Light scattering: %s",
UserConfigParams::m_light_scatter ? enabled : disabled);
//I18N: in graphical options
tooltip = tooltip + L"\n" + _("Anti-aliasing: %s",
UserConfigParams::m_mlaa ? enabled : disabled);
//I18N: in graphical options
tooltip = tooltip + L"\n" + _("Ambient occlusion: %s",
UserConfigParams::m_ssao ? enabled : disabled);
tooltip = tooltip + L"\n" + _("Glow (outlines): %s",
UserConfigParams::m_glow ? enabled : disabled);
//I18N: in graphical options
if (UserConfigParams::m_shadows_resolution == 0)
tooltip = tooltip + L"\n" + _("Shadows: %s", disabled);
else
tooltip = tooltip + L"\n" + _("Shadows: %i", UserConfigParams::m_shadows_resolution);

tooltip = tooltip + L"\n" + _("Light shaft (God rays): %s",
UserConfigParams::m_light_shaft ? enabled : disabled);
//I18N: in graphical options
tooltip = tooltip + L"\n" + _("Bloom: %s",
UserConfigParams::m_bloom ? enabled : disabled);

//I18N: in graphical options
tooltip = tooltip + L"\n" + _("Glow (outlines): %s",
UserConfigParams::m_glow ? enabled : disabled);
tooltip = tooltip + L"\n" + _("Ambient occlusion: %s",
UserConfigParams::m_ssao ? enabled : disabled);
//I18N: in graphical options
tooltip = tooltip + L"\n" + _("Soft shadows: %s",
UserConfigParams::m_pcss ? enabled : disabled);

//I18N: in graphical options
tooltip = tooltip + L"\n" + _("Light shaft (God rays): %s",
UserConfigParams::m_light_shaft ? enabled : disabled);
tooltip = tooltip + L"\n" + _("Animated Characters: %s",
UserConfigParams::m_animated_characters ? enabled : disabled);
//I18N: in graphical options
tooltip = tooltip + L"\n" + _("Particles Effects: %s",
UserConfigParams::m_particles_effects == 2 ? enabled :
UserConfigParams::m_particles_effects == 1 ? important_only :
disabled);

//I18N: in graphical options
int quality = getImageQuality();
Expand Down

0 comments on commit 7c09862

Please sign in to comment.