- if(active_item > 0 && active_item < (int)item.size())
- {
- // FIXME: wtf?! having a hack to avoid horizontal lines...
- // Elegant solution would be to check for horizontal lines, right
- // when it was asked to move menu up and down
- if(item[active_item].kind == MN_DEACTIVE ||
- item[active_item].kind == MN_LABEL ||
- item[active_item].kind == MN_HL)
- {
- // Skip the horzontal line item
- if (menuaction != MENU_ACTION_UP && menuaction != MENU_ACTION_DOWN)
- menuaction = MENU_ACTION_DOWN;
-
- if (item.size() > 1)
- action();
- }
- }