static const float MENU_REPEAT_RATE = 0.1f;
Menu::Menu() :
- hit_item(),
pos(),
menuaction(),
delete_character(),
arrange_left(),
active_item()
{
- hit_item = -1;
menuaction = MENU_ACTION_NONE;
delete_character = 0;
mn_input_char = '\0';
menuaction = MENU_ACTION_BACK;
}
- hit_item = -1;
if(items.size() == 0)
return;
break;
case MENU_ACTION_HIT: {
- hit_item = active_item;
switch (items[active_item]->kind) {
case MN_GOTO:
assert(items[active_item]->target_menu != 0);
assert(active_item < int(items.size()));
}
-int
-Menu::check()
-{
- if (hit_item != -1)
- {
- int id = items[hit_item]->id;
- // Clear event when checked out.. (we would end up in a loop when we try to leave "fake" submenu like Addons or Contrib)
- hit_item = -1;
- return id;
- }
- else
- return -1;
-}
-
void
Menu::menu_action(MenuItem* )
{}