mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 11:22:18 -04:00
fix Enter and Clear keys with mouse cursor
This commit is contained in:
parent
52aa64eb8a
commit
e3886634fd
@ -3284,13 +3284,7 @@ boolean MN_SetupResponder(menu_action_t action, int ch)
|
||||
current_tabs[highlight_tab].flags &= ~S_HILITE;
|
||||
}
|
||||
|
||||
if (highlight_item >= 0 && highlight_item != set_item_on)
|
||||
{
|
||||
current_menu[highlight_item].m_flags &= ~S_HILITE;
|
||||
}
|
||||
|
||||
int index = (old_menu_input == mouse_mode ? highlight_item : set_item_on);
|
||||
setup_menu_t *current_item = current_menu + index;
|
||||
setup_menu_t *current_item = current_menu + set_item_on;
|
||||
|
||||
// phares 4/19/98:
|
||||
// Catch the response to the 'reset to default?' verification
|
||||
@ -3368,6 +3362,26 @@ boolean MN_SetupResponder(menu_action_t action, int ch)
|
||||
return true;
|
||||
}
|
||||
|
||||
// [FG] clear key bindings with the DEL key
|
||||
if (action == MENU_CLEAR)
|
||||
{
|
||||
int index = (old_menu_input == mouse_mode ? highlight_item : set_item_on);
|
||||
current_item = current_menu + index;
|
||||
|
||||
if (current_item->m_flags & S_INPUT)
|
||||
{
|
||||
M_InputReset(current_item->input_id);
|
||||
}
|
||||
menu_input = old_menu_input;
|
||||
MN_ResetMouseCursor();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (highlight_item >= 0 && highlight_item != set_item_on)
|
||||
{
|
||||
current_menu[highlight_item].m_flags &= ~S_HILITE;
|
||||
}
|
||||
|
||||
// Not changing any items on the Setup screens. See if we're
|
||||
// navigating the Setup menus or selecting an item to change.
|
||||
|
||||
@ -3413,18 +3427,6 @@ boolean MN_SetupResponder(menu_action_t action, int ch)
|
||||
return true;
|
||||
}
|
||||
|
||||
// [FG] clear key bindings with the DEL key
|
||||
if (action == MENU_CLEAR)
|
||||
{
|
||||
int flags = current_item->m_flags;
|
||||
|
||||
if (flags & S_INPUT)
|
||||
{
|
||||
M_InputReset(current_item->input_id);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (action == MENU_ENTER)
|
||||
{
|
||||
int flags = current_item->m_flags;
|
||||
|
Loading…
x
Reference in New Issue
Block a user