Apply patch by xenux to improve addon filtering
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@13049 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
0f250999f8
commit
ba320dc16d
@ -113,13 +113,11 @@ void AddonsScreen::beforeAddingWidget()
|
||||
w_filter_date->m_properties[GUIEngine::PROP_MAX_VALUE] =
|
||||
StringUtils::toString(m_date_filters.size() - 1);
|
||||
|
||||
for (int n = 0; n < m_date_filters.size(); n++)
|
||||
for (unsigned int n = 0; n < m_date_filters.size(); n++)
|
||||
{
|
||||
w_filter_date->addLabel(m_date_filters[n].label);
|
||||
}
|
||||
|
||||
w_filter_date->setValue(0);
|
||||
|
||||
GUIEngine::SpinnerWidget* w_filter_rating =
|
||||
getWidget<GUIEngine::SpinnerWidget>("filter_rating");
|
||||
w_filter_rating->m_properties[GUIEngine::PROP_MIN_VALUE] = "0";
|
||||
@ -129,8 +127,6 @@ void AddonsScreen::beforeAddingWidget()
|
||||
{
|
||||
w_filter_rating->addLabel(StringUtils::toWString(1.0 + n / 2.0));
|
||||
}
|
||||
|
||||
w_filter_rating->setValue(0);
|
||||
}
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@ -164,7 +160,16 @@ void AddonsScreen::init()
|
||||
else
|
||||
getWidget<GUIEngine::ButtonWidget>("reload")->setActivated();
|
||||
|
||||
|
||||
// Reset filter.
|
||||
GUIEngine::TextBoxWidget* w_filter_name =
|
||||
getWidget<GUIEngine::TextBoxWidget>("filter_name");
|
||||
w_filter_name->setText(L"");
|
||||
GUIEngine::SpinnerWidget* w_filter_date =
|
||||
getWidget<GUIEngine::SpinnerWidget>("filter_date");
|
||||
w_filter_date->setValue(0);
|
||||
GUIEngine::SpinnerWidget* w_filter_rating =
|
||||
getWidget<GUIEngine::SpinnerWidget>("filter_rating");
|
||||
w_filter_rating->setValue(0);
|
||||
|
||||
// Set the default sort order
|
||||
Addon::setSortOrder(Addon::SO_DEFAULT);
|
||||
|
Loading…
Reference in New Issue
Block a user