Ground work for geometry detail option
This commit is contained in:
parent
6a142e8d2e
commit
e62edcc89a
@ -173,6 +173,14 @@
|
||||
<gauge id="filtering" min_value="0" max_value="5" width="50%" />
|
||||
</div>
|
||||
|
||||
<spacer height="4" width="10" />
|
||||
|
||||
<div layout="horizontal-row" width="100%" proportion="1">
|
||||
<label text="Geometry detail" I18N="Video settings" width="40%"/>
|
||||
<spacer width="10" height="10"/>
|
||||
<gauge id="geometry_detail" min_value="0" max_value="2" width="50%" />
|
||||
</div>
|
||||
|
||||
<spacer height="10" width="10" />
|
||||
|
||||
<label text="* Restart STK to apply new settings" width="100%" text_align="center" I18N="Video settings"/>
|
||||
|
@ -279,6 +279,10 @@ enum AnimType {ANIMS_NONE = 0,
|
||||
ANIMS_PLAYERS_ONLY = 1,
|
||||
ANIMS_ALL = 2 };
|
||||
|
||||
enum GeometryLevel {GEOLEVEL_0 = 0,
|
||||
GEOLEVEL_1 = 1,
|
||||
GEOLEVEL_2 = 2 };
|
||||
|
||||
/** Using X-macros for setting-possible values is not very pretty, but it's a
|
||||
* no-maintenance case :
|
||||
* when you want to add a new parameter, just add one signle line below and
|
||||
@ -673,6 +677,13 @@ 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") );
|
||||
|
||||
PARAM_PREFIX IntUserConfigParam m_anisotropic
|
||||
PARAM_DEFAULT( IntUserConfigParam(4, "anisotropic",
|
||||
&m_graphics_quality,
|
||||
|
@ -75,6 +75,14 @@ void CustomVideoSettingsDialog::beforeAddingWidgets()
|
||||
UserConfigParams::m_show_steering_animations == 2 ?
|
||||
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);
|
||||
|
||||
SpinnerWidget* filtering = getWidget<SpinnerWidget>("filtering");
|
||||
int value = 0;
|
||||
if (UserConfigParams::m_anisotropic == 2) value = 2;
|
||||
@ -192,6 +200,9 @@ GUIEngine::EventPropagation CustomVideoSettingsDialog::processEvent(const std::s
|
||||
UserConfigParams::m_show_steering_animations =
|
||||
getWidget<SpinnerWidget>("steering_animations")->getValue();
|
||||
|
||||
UserConfigParams::m_geometry_level =
|
||||
getWidget<SpinnerWidget>("geometry_detail")->getValue();
|
||||
|
||||
switch (getWidget<SpinnerWidget>("filtering")->getValue())
|
||||
{
|
||||
case 0:
|
||||
|
Loading…
Reference in New Issue
Block a user