Allow disabling kart animations from options menu, to get a fps boost on lower end computers
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6649 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -21,8 +21,19 @@
|
||||
<spacer height="20" width="10"/>
|
||||
|
||||
<label width="100%" I18N="In the graphics settings" text="Skin"/>
|
||||
<!-- FIXME: don't hardcode size -->
|
||||
<spinner id="skinchoice" width="300" height="50" />
|
||||
|
||||
<!-- FIXME don't hardcode height, should depend on text height -->
|
||||
<div width="75%" height="40" layout="horizontal-row" >
|
||||
|
||||
<!-- FIXME: don't hardcode size -->
|
||||
<spinner id="skinchoice" width="300" height="50" />
|
||||
|
||||
<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"/>
|
||||
</div>
|
||||
|
||||
|
||||
<spacer height="40" width="10"/>
|
||||
<label width="100%" I18N="In the graphics settings" text="Resolution"/>
|
||||
@@ -33,6 +44,7 @@
|
||||
|
||||
<spacer height="10" width="10"/>
|
||||
|
||||
<!-- FIXME don't hardcode height, should depend on text height -->
|
||||
<div width="75%" height="40" layout="horizontal-row" >
|
||||
<spacer width="40" height="100%" />
|
||||
<checkbox id="fullscreen" width="40" height="40"/>
|
||||
@@ -43,7 +55,9 @@
|
||||
<spacer height="10" width="10"/>
|
||||
|
||||
<button id="apply_resolution"
|
||||
I18N="In the video settings menu" text="Apply video changes" />
|
||||
I18N="In the video settings menu" text="Apply new resolution" />
|
||||
|
||||
<spacer height="4" width="4"/>
|
||||
|
||||
</box>
|
||||
|
||||
|
||||
@@ -108,6 +108,9 @@ void OptionsScreenVideo::init()
|
||||
GUIEngine::ButtonWidget* applyBtn = this->getWidget<GUIEngine::ButtonWidget>("apply_resolution");
|
||||
assert( applyBtn != NULL );
|
||||
|
||||
GUIEngine::CheckBoxWidget* animatedKarts = this->getWidget<GUIEngine::CheckBoxWidget>("anim");
|
||||
assert( animatedKarts != NULL );
|
||||
|
||||
// ---- video modes
|
||||
DynamicRibbonWidget* res = this->getWidget<DynamicRibbonWidget>("resolutions");
|
||||
assert( res != NULL );
|
||||
@@ -154,18 +157,20 @@ void OptionsScreenVideo::init()
|
||||
|
||||
res->updateItemDisplay();
|
||||
|
||||
// forbid changing resolution from in-game
|
||||
// forbid changing resolution or animation settings from in-game
|
||||
if (StateManager::get()->getGameState() == GUIEngine::INGAME_MENU)
|
||||
{
|
||||
res->setDeactivated();
|
||||
full->setDeactivated();
|
||||
applyBtn->setDeactivated();
|
||||
animatedKarts->setDeactivated();
|
||||
}
|
||||
else
|
||||
{
|
||||
res->setActivated();
|
||||
full->setActivated();
|
||||
applyBtn->setActivated();
|
||||
animatedKarts->setActivated();
|
||||
}
|
||||
|
||||
// ---- select current resolution every time
|
||||
@@ -189,7 +194,6 @@ void OptionsScreenVideo::init()
|
||||
} // end for
|
||||
|
||||
// --- select the right skin in the spinner
|
||||
|
||||
bool currSkinFound = false;
|
||||
const int skinCount = m_skins.size();
|
||||
for (int n=0; n<skinCount; n++)
|
||||
@@ -210,6 +214,9 @@ void OptionsScreenVideo::init()
|
||||
GUIEngine::reloadSkin();
|
||||
}
|
||||
|
||||
// --- set animations checkbox value
|
||||
animatedKarts->setState( UserConfigParams::m_show_steering_animations );
|
||||
|
||||
} // init
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -260,6 +267,12 @@ void OptionsScreenVideo::eventCallback(Widget* widget, const std::string& name,
|
||||
UserConfigParams::m_skin_file = core::stringc(selectedSkin.c_str()).c_str() + std::string(".stkskin");
|
||||
GUIEngine::reloadSkin();
|
||||
}
|
||||
else if (name == "anim")
|
||||
{
|
||||
GUIEngine::CheckBoxWidget* animatedKarts = this->getWidget<GUIEngine::CheckBoxWidget>("anim");
|
||||
assert( animatedKarts != NULL );
|
||||
UserConfigParams::m_show_steering_animations = animatedKarts->getState();
|
||||
}
|
||||
|
||||
} // eventCallback
|
||||
|
||||
|
||||
Reference in New Issue
Block a user