you can now warp horizontally in menus

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3369 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2009-04-06 23:09:39 +00:00
parent 060720c454
commit b1964b2bff

View File

@ -380,8 +380,12 @@ bool RibbonWidget::rightPressed()
m_selection++;
if(m_selection >= m_children.size())
{
if(m_parent != NULL) ((RibbonGridWidget*)m_parent)->scroll(1); // FIXME? - find cleaner way to propagate event to parent
m_selection = m_children.size() - 1;
if(m_parent != NULL)
{
((RibbonGridWidget*)m_parent)->scroll(1); // FIXME? - find cleaner way to propagate event to parent
m_selection = m_children.size()-1;
}
else m_selection = 0;
}
updateSelection();
@ -393,8 +397,12 @@ bool RibbonWidget::leftPressed()
m_selection--;
if(m_selection < 0)
{
if(m_parent != NULL) ((RibbonGridWidget*)m_parent)->scroll(-1); // FIXME? - find cleaner way to propagate event to parent
m_selection = 0;
if(m_parent != NULL)
{
((RibbonGridWidget*)m_parent)->scroll(-1); // FIXME? - find cleaner way to propagate event to parent
m_selection = 0;
}
else m_selection = m_children.size()-1;
}
updateSelection();