Allow track loading to take care of geometry details
This commit is contained in:
parent
7085c164b5
commit
15469e555d
@ -677,12 +677,12 @@ namespace UserConfigParams
|
||||
"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 IntUserConfigParam m_geometry_level
|
||||
PARAM_DEFAULT( IntUserConfigParam(GEOLEVEL_2,
|
||||
"geometry_level", &m_graphics_quality,
|
||||
"Geometry quality 0=lowest level, no details; "
|
||||
"1=a few details are displayed; 2=everything is displayed") );
|
||||
"Geometry quality 0=everything is displayed; "
|
||||
"1=a few details are displayed; 2=lowest level, no details") );
|
||||
|
||||
PARAM_PREFIX IntUserConfigParam m_anisotropic
|
||||
PARAM_DEFAULT( IntUserConfigParam(4, "anisotropic",
|
||||
|
@ -76,12 +76,15 @@ void CustomVideoSettingsDialog::beforeAddingWidgets()
|
||||
1 : UserConfigParams::m_show_steering_animations);
|
||||
|
||||
SpinnerWidget* geometry_level = getWidget<SpinnerWidget>("geometry_detail");
|
||||
geometry_level->addLabel(_("disabled")); // 0
|
||||
//I18N: animations setting (only karts with human players are animated)
|
||||
geometry_level->addLabel(_("low")); // 1
|
||||
//I18N: animations setting (all karts are animated)
|
||||
geometry_level->addLabel(_("high")); // 2
|
||||
geometry_level->setValue(UserConfigParams::m_geometry_level);
|
||||
//I18N: Geometry level disabled : lowest level, no details
|
||||
geometry_level->addLabel(_("Disabled"));
|
||||
//I18N: Geometry level low : few details are displayed
|
||||
geometry_level->addLabel(_("low"));
|
||||
//I18N: Geometry level high : everything is displayed
|
||||
geometry_level->addLabel(_("high"));
|
||||
geometry_level->setValue(
|
||||
UserConfigParams::m_geometry_level == 2 ? 0 :
|
||||
UserConfigParams::m_geometry_level == 0 ? 2 : 1);
|
||||
|
||||
SpinnerWidget* filtering = getWidget<SpinnerWidget>("filtering");
|
||||
int value = 0;
|
||||
@ -200,8 +203,9 @@ GUIEngine::EventPropagation CustomVideoSettingsDialog::processEvent(const std::s
|
||||
UserConfigParams::m_show_steering_animations =
|
||||
getWidget<SpinnerWidget>("steering_animations")->getValue();
|
||||
|
||||
UserConfigParams::m_geometry_level =
|
||||
const int val =
|
||||
getWidget<SpinnerWidget>("geometry_detail")->getValue();
|
||||
UserConfigParams::m_geometry_level = val == 2 ? 0 : val == 0 ? 2 : 1;
|
||||
|
||||
switch (getWidget<SpinnerWidget>("filtering")->getValue())
|
||||
{
|
||||
|
@ -1960,6 +1960,10 @@ void Track::loadObjects(const XMLNode* root, const std::string& path, ModelDefin
|
||||
if (name == "track" || name == "default-start") continue;
|
||||
if (name == "object" || name == "library")
|
||||
{
|
||||
int geo_level = 0;
|
||||
node->get("geometry-level", &geo_level);
|
||||
if (UserConfigParams::m_geometry_level + geo_level - 2 > 0)
|
||||
continue;
|
||||
m_track_object_manager->add(*node, parent, model_def_loader, parent_library);
|
||||
}
|
||||
else if (name == "water")
|
||||
|
Loading…
Reference in New Issue
Block a user