More work on deactivating gfx; gfx can now be deactivated from options screen
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6652 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -20,22 +20,38 @@
|
||||
|
||||
<spacer height="20" width="10"/>
|
||||
|
||||
<label width="100%" I18N="In the graphics settings" text="Skin"/>
|
||||
|
||||
<!-- FIXME don't hardcode height, should depend on text height -->
|
||||
<div width="75%" height="40" layout="horizontal-row" >
|
||||
<div width="100%" proportion="2" layout="horizontal-row" >
|
||||
|
||||
<!-- FIXME: don't hardcode size -->
|
||||
<spinner id="skinchoice" width="300" height="50" />
|
||||
<!-- ************ SKIN CHOICE ************ -->
|
||||
<div layout="vertical-row" proportion="2" height="100%">
|
||||
<label width="100%" I18N="In the graphics settings" text="Skin"/>
|
||||
|
||||
<spacer width="100" height="100%" />
|
||||
<checkbox id="anim" width="40" height="40" />
|
||||
<spacer width="20" height="100%" />
|
||||
<label proportion="1" height="100%" I18N="In the video settings" text="Animated Karts"/>
|
||||
<!-- FIXME: don't hardcode size -->
|
||||
<spinner id="skinchoice" width="300" height="50" />
|
||||
</div>
|
||||
|
||||
<!-- ************ GRAPHICAL EFFECTS SETTINGS ************ -->
|
||||
<div layout="vertical-row" proportion="3" height="100%">
|
||||
|
||||
<label width="100%" I18N="In the graphics settings" text="Graphical Effects Settings"/>
|
||||
|
||||
<div width="100%" proportion="1" layout="horizontal-row" >
|
||||
<checkbox id="anim" width="40" height="40" />
|
||||
<spacer width="20" height="100%" />
|
||||
<label proportion="1" height="100%" I18N="In the video settings" text="Animated Karts"/>
|
||||
</div>
|
||||
|
||||
<div width="100%" proportion="1" layout="horizontal-row" >
|
||||
<checkbox id="gfx" width="40" height="40" />
|
||||
<spacer width="20" height="100%" />
|
||||
<label proportion="1" height="100%" I18N="In the video settings" text="Animated Effects and Scenery"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<spacer height="40" width="10"/>
|
||||
<!-- ************ RESOLUTION CHOICE ************ -->
|
||||
<spacer height="10" width="10"/>
|
||||
<label width="100%" I18N="In the graphics settings" text="Resolution"/>
|
||||
|
||||
<scrollable_ribbon id="resolutions" proportion="2" label_location="each"
|
||||
|
||||
@@ -154,8 +154,11 @@ void EmergencyAnimation::handleExplosion(const Vec3 &pos, bool direct_hit)
|
||||
m_add_rotation.setHeading( (rand()%(2*max_rotation+1)-max_rotation)*f );
|
||||
m_add_rotation.setPitch( (rand()%(2*max_rotation+1)-max_rotation)*f );
|
||||
m_add_rotation.setRoll( (rand()%(2*max_rotation+1)-max_rotation)*f );
|
||||
m_stars_effect->showFor(6.0f);
|
||||
|
||||
|
||||
if ( UserConfigParams::m_graphical_effects )
|
||||
{
|
||||
m_stars_effect->showFor(6.0f);
|
||||
}
|
||||
} // handleExplosion
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@@ -111,6 +111,9 @@ void OptionsScreenVideo::init()
|
||||
GUIEngine::CheckBoxWidget* animatedKarts = this->getWidget<GUIEngine::CheckBoxWidget>("anim");
|
||||
assert( animatedKarts != NULL );
|
||||
|
||||
GUIEngine::CheckBoxWidget* gfx = this->getWidget<GUIEngine::CheckBoxWidget>("gfx");
|
||||
assert( gfx != NULL );
|
||||
|
||||
// ---- video modes
|
||||
DynamicRibbonWidget* res = this->getWidget<DynamicRibbonWidget>("resolutions");
|
||||
assert( res != NULL );
|
||||
@@ -164,6 +167,7 @@ void OptionsScreenVideo::init()
|
||||
full->setDeactivated();
|
||||
applyBtn->setDeactivated();
|
||||
animatedKarts->setDeactivated();
|
||||
gfx->setDeactivated();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -171,6 +175,7 @@ void OptionsScreenVideo::init()
|
||||
full->setActivated();
|
||||
applyBtn->setActivated();
|
||||
animatedKarts->setActivated();
|
||||
gfx->setActivated();
|
||||
}
|
||||
|
||||
// ---- select current resolution every time
|
||||
@@ -214,9 +219,9 @@ void OptionsScreenVideo::init()
|
||||
GUIEngine::reloadSkin();
|
||||
}
|
||||
|
||||
// --- set animations checkbox value
|
||||
// --- set gfx settings values
|
||||
animatedKarts->setState( UserConfigParams::m_show_steering_animations );
|
||||
|
||||
gfx->setState( UserConfigParams::m_graphical_effects );
|
||||
} // init
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -273,6 +278,12 @@ void OptionsScreenVideo::eventCallback(Widget* widget, const std::string& name,
|
||||
assert( animatedKarts != NULL );
|
||||
UserConfigParams::m_show_steering_animations = animatedKarts->getState();
|
||||
}
|
||||
else if (name == "gfx")
|
||||
{
|
||||
GUIEngine::CheckBoxWidget* gfx = this->getWidget<GUIEngine::CheckBoxWidget>("gfx");
|
||||
assert( gfx != NULL );
|
||||
UserConfigParams::m_graphical_effects = gfx->getState();
|
||||
}
|
||||
|
||||
} // eventCallback
|
||||
|
||||
|
||||
Reference in New Issue
Block a user