Clean up config file a little (group GFX options toghether) and make anti-aliasing available in the GFX slider
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7995 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
decc8f21e9
commit
abaa9847a7
@ -273,17 +273,7 @@ namespace UserConfigParams
|
||||
PARAM_DEFAULT( IntUserConfigParam(600, "prev_height", &m_video_group,"Previous screen/window height") );
|
||||
PARAM_PREFIX BoolUserConfigParam m_prev_fullscreen
|
||||
PARAM_DEFAULT( BoolUserConfigParam(false, "prev_fullscreen", &m_video_group) );
|
||||
|
||||
PARAM_PREFIX BoolUserConfigParam m_graphical_effects
|
||||
PARAM_DEFAULT( BoolUserConfigParam(true, "gfx", &m_video_group) );
|
||||
|
||||
PARAM_PREFIX BoolUserConfigParam m_weather_effects
|
||||
PARAM_DEFAULT( BoolUserConfigParam(true, "weather_gfx", &m_video_group) );
|
||||
|
||||
PARAM_PREFIX IntUserConfigParam m_show_steering_animations
|
||||
PARAM_DEFAULT( IntUserConfigParam(ANIMS_ALL, "steering_animations", &m_video_group,
|
||||
"Whether to display kart animations (0=disabled for all; "
|
||||
"1=enabled for humans, disabled for AIs; 2=enabled for all") );
|
||||
|
||||
|
||||
PARAM_PREFIX BoolUserConfigParam m_display_fps
|
||||
PARAM_DEFAULT( BoolUserConfigParam(false, "show_fps", &m_video_group, "Display frame per seconds") );
|
||||
@ -340,18 +330,27 @@ namespace UserConfigParams
|
||||
PARAM_PREFIX GroupUserConfigParam m_graphics_quality
|
||||
PARAM_DEFAULT( GroupUserConfigParam("GFX", "Graphics Quality Settings") );
|
||||
|
||||
PARAM_PREFIX BoolUserConfigParam m_graphical_effects
|
||||
PARAM_DEFAULT( BoolUserConfigParam(true, "anim_gfx", &m_graphics_quality, "Scenery animations") );
|
||||
|
||||
PARAM_PREFIX BoolUserConfigParam m_weather_effects
|
||||
PARAM_DEFAULT( BoolUserConfigParam(true, "weather_gfx", &m_graphics_quality, "Weather effects") );
|
||||
PARAM_PREFIX IntUserConfigParam m_show_steering_animations
|
||||
PARAM_DEFAULT( IntUserConfigParam(ANIMS_ALL, "steering_animations", &m_graphics_quality,
|
||||
"Whether to display kart animations (0=disabled for all; "
|
||||
"1=enabled for humans, disabled for AIs; 2=enabled for all") );
|
||||
PARAM_PREFIX BoolUserConfigParam m_anisotropic
|
||||
PARAM_DEFAULT( BoolUserConfigParam(true, "anisotropic", &m_graphics_quality,
|
||||
"Whether anisotropic filtering is allowed to be used (true or false)") );
|
||||
PARAM_PREFIX BoolUserConfigParam m_trilinear
|
||||
PARAM_DEFAULT( BoolUserConfigParam(true, "trilinear", &m_graphics_quality,
|
||||
"Whether trilinear filtering is allowed to be used (true or false)") );
|
||||
PARAM_DEFAULT( BoolUserConfigParam(true, "trilinear", &m_graphics_quality,
|
||||
"Whether trilinear filtering is allowed to be used (true or false)") );
|
||||
PARAM_PREFIX BoolUserConfigParam m_fullscreen_antialiasing
|
||||
PARAM_DEFAULT( BoolUserConfigParam(false, "fullscreen_antialiasing", &m_graphics_quality,
|
||||
"Whether fullscreen antialiasing is enabled") );
|
||||
PARAM_DEFAULT( BoolUserConfigParam(false, "fullscreen_antialiasing", &m_graphics_quality,
|
||||
"Whether fullscreen antialiasing is enabled") );
|
||||
PARAM_PREFIX BoolUserConfigParam m_vsync
|
||||
PARAM_DEFAULT( BoolUserConfigParam(false, "vsync", &m_graphics_quality,
|
||||
"Whether vertical sync is enabled") );
|
||||
PARAM_DEFAULT( BoolUserConfigParam(false, "vsync", &m_graphics_quality,
|
||||
"Whether vertical sync is enabled") );
|
||||
|
||||
// ---- Misc
|
||||
PARAM_PREFIX BoolUserConfigParam m_minimal_race_gui
|
||||
|
@ -43,10 +43,11 @@ using namespace GUIEngine;
|
||||
DEFINE_SCREEN_SINGLETON( OptionsScreenVideo );
|
||||
|
||||
// Look-up table for GFX levels
|
||||
const bool GFX [] = {false, true, true, true, true};
|
||||
const int GFX_ANIM_KARTS[] = {0, 0, 1, 2, 2 };
|
||||
const bool GFX_WEATHER [] = {false, false, false, false, true};
|
||||
const int GFX_LEVEL_AMOUNT = 5;
|
||||
const bool GFX [] = {false, true, true, true, true, true};
|
||||
const int GFX_ANIM_KARTS[] = {0, 0, 1, 2, 2, 2 };
|
||||
const bool GFX_WEATHER [] = {false, false, false, false, true, true};
|
||||
const bool GFX_ANTIALIAS [] = {false, false, false, false, false, true};
|
||||
const int GFX_LEVEL_AMOUNT = 6;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@ -88,7 +89,7 @@ void OptionsScreenVideo::loadedFromFile()
|
||||
skinSelector->setDeactivated();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const int skinCount = m_skins.size();
|
||||
for (int n=0; n<skinCount; n++)
|
||||
{
|
||||
@ -99,6 +100,9 @@ void OptionsScreenVideo::loadedFromFile()
|
||||
skinSelector->m_properties[GUIEngine::PROP_MIN_VALUE] = "0";
|
||||
skinSelector->m_properties[GUIEngine::PROP_MAX_VALUE] = StringUtils::toString(skinCount-1);
|
||||
|
||||
GUIEngine::SpinnerWidget* gfx = this->getWidget<GUIEngine::SpinnerWidget>("gfx_level");
|
||||
gfx->m_properties[GUIEngine::PROP_MAX_VALUE] = StringUtils::toString(GFX_LEVEL_AMOUNT);
|
||||
|
||||
} // loadedFromFile
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -293,7 +297,8 @@ void OptionsScreenVideo::init()
|
||||
{
|
||||
if (UserConfigParams::m_show_steering_animations == GFX_ANIM_KARTS[l] &&
|
||||
UserConfigParams::m_graphical_effects == GFX[l] &&
|
||||
UserConfigParams::m_weather_effects == GFX_WEATHER[l])
|
||||
UserConfigParams::m_weather_effects == GFX_WEATHER[l] &&
|
||||
UserConfigParams::m_fullscreen_antialiasing == GFX_ANTIALIAS[l])
|
||||
{
|
||||
gfx->setValue(l+1);
|
||||
break;
|
||||
@ -323,10 +328,15 @@ void OptionsScreenVideo::updateTooltip()
|
||||
//I18N: if no kart animations are enabled
|
||||
core::stringw none = _("None");
|
||||
|
||||
//I18N: in graphical options
|
||||
tooltip = _("Animated Scenery : %s", UserConfigParams::m_graphical_effects ? enabled : disabled);
|
||||
//I18N: in graphical options
|
||||
tooltip = tooltip + L"\n" + _("Weather Effects : %s", UserConfigParams::m_weather_effects ? enabled : disabled);
|
||||
//I18N: in graphical options
|
||||
tooltip = tooltip + L"\n" + _("Animated Characters : %s", UserConfigParams::m_show_steering_animations == 2 ? all :
|
||||
(UserConfigParams::m_show_steering_animations == 1 ? me : none));
|
||||
//I18N: in graphical options
|
||||
tooltip = tooltip + L"\n" + _("Anti-aliasing (requires restart) : %s", UserConfigParams::m_fullscreen_antialiasing ? enabled : disabled);
|
||||
gfx->setTooltip(tooltip);
|
||||
}
|
||||
|
||||
@ -388,6 +398,7 @@ void OptionsScreenVideo::eventCallback(Widget* widget, const std::string& name,
|
||||
UserConfigParams::m_show_steering_animations = GFX_ANIM_KARTS[level-1];
|
||||
UserConfigParams::m_graphical_effects = GFX[level-1];
|
||||
UserConfigParams::m_weather_effects = GFX_WEATHER[level-1];
|
||||
UserConfigParams::m_fullscreen_antialiasing = GFX_ANTIALIAS[level-1];
|
||||
|
||||
updateTooltip();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user