Fixed wrong label shown in button if editing a keyboard after editing a gamepad

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7591 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2011-02-03 00:27:30 +00:00
parent a192e0608d
commit 9b7fdf3b5b

View File

@ -76,16 +76,20 @@ void OptionsScreenInput2::init()
//deleteBtn->setDeactivated();
}
else if (input_manager->getDeviceList()->getKeyboardAmount() < 2)
{
// don't allow deleting the last config
deleteBtn->setDeactivated();
}
else
{
deleteBtn->setActivated();
deleteBtn->setLabel(_("Delete Configuration"));
if (input_manager->getDeviceList()->getKeyboardAmount() < 2)
{
// don't allow deleting the last config
deleteBtn->setDeactivated();
}
else
{
deleteBtn->setActivated();
}
}
LabelWidget* label = this->getWidget<LabelWidget>("title");
label->setText( m_config->getName().c_str() );