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