From 22377400908a2896130edcbd0b7933811e9f1c6c Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Thu, 28 Mar 2013 05:02:46 -0400 Subject: Restore the functionality of selection options with handler functions. This unbreaks commit 57bcab6a250a138d42735504e871ff7011974532. --- source/nds/gui.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/nds/gui.c b/source/nds/gui.c index b31acee..0df85e1 100644 --- a/source/nds/gui.c +++ b/source/nds/gui.c @@ -3970,14 +3970,7 @@ u32 menu(u16 *screen, bool8 FirstInvocation) current_option_num = next_option_num; current_option = current_menu->options + current_option_num; - if(current_option->option_type & ACTION_TYPE) - current_option->action_function(); - else if(current_menu->key_function) - { - gui_action = CURSOR_RIGHT; - current_menu->key_function(); - } - else if(current_option->option_type & (NUMBER_SELECTION_TYPE | STRING_SELECTION_TYPE)) + if(current_option->option_type & (NUMBER_SELECTION_TYPE | STRING_SELECTION_TYPE)) { gui_action = CURSOR_RIGHT; u32 current_option_val = *(current_option->current_option); @@ -3991,6 +3984,13 @@ u32 menu(u16 *screen, bool8 FirstInvocation) if(current_option->action_function) current_option->action_function(); } + else if(current_option->option_type & ACTION_TYPE) + current_option->action_function(); + else if(current_menu->key_function) + { + gui_action = CURSOR_RIGHT; + current_menu->key_function(); + } else if(current_option->option_type & SUBMENU_TYPE) choose_menu(current_option->sub_menu); } -- cgit v1.2.3