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,9 +380,13 @@ bool RibbonWidget::rightPressed()
m_selection++; m_selection++;
if(m_selection >= m_children.size()) if(m_selection >= m_children.size())
{ {
if(m_parent != NULL) ((RibbonGridWidget*)m_parent)->scroll(1); // FIXME? - find cleaner way to propagate event to parent if(m_parent != NULL)
{
((RibbonGridWidget*)m_parent)->scroll(1); // FIXME? - find cleaner way to propagate event to parent
m_selection = m_children.size()-1; m_selection = m_children.size()-1;
} }
else m_selection = 0;
}
updateSelection(); updateSelection();
return m_ribbon_type != RIBBON_TOOLBAR; return m_ribbon_type != RIBBON_TOOLBAR;
@ -393,9 +397,13 @@ bool RibbonWidget::leftPressed()
m_selection--; m_selection--;
if(m_selection < 0) if(m_selection < 0)
{ {
if(m_parent != NULL) ((RibbonGridWidget*)m_parent)->scroll(-1); // FIXME? - find cleaner way to propagate event to parent if(m_parent != NULL)
{
((RibbonGridWidget*)m_parent)->scroll(-1); // FIXME? - find cleaner way to propagate event to parent
m_selection = 0; m_selection = 0;
} }
else m_selection = m_children.size()-1;
}
updateSelection(); updateSelection();
return m_ribbon_type != RIBBON_TOOLBAR; return m_ribbon_type != RIBBON_TOOLBAR;