Simplified ribbon code by not invoking number of row estimation code for single-row ribbons...

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6087 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-09-20 17:36:02 +00:00
parent a17b78d5fc
commit 69feb27034

View File

@ -180,12 +180,15 @@ void DynamicRibbonWidget::add()
m_child_height = 256;
}
if (m_multi_row)
{
// determine row amount
const float aspect_ratio = (float)m_child_width / (float)m_child_height;
// const int count = m_items.size();
int max_score_so_far = -1;
m_row_amount = -1;
int max_score_so_far = -1;
for (int row_count = 1; row_count < 10; row_count++)
{
@ -233,6 +236,12 @@ void DynamicRibbonWidget::add()
if (m_row_amount > max_rows) m_row_amount = max_rows;
}
}
}
else
{
m_row_amount = 1;
}
// get and build a list of IDs (by now we may not yet know everything about items,
// but we need to get IDs *now* in order for tabbing to work.
m_ids.resize(m_row_amount);