[AD] Non-blocking menus block during menu cancellation click

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


This is to report a minor concern I discovered while digging in the menu 
code; that menus block until all mouse buttons are released when a mouse click is 
used to cancel and close the menu (do { } while (gui_mouse_b();).

I was attempting to come up with a solution, and these were what I came up 
with so far:

1) alter the mouse code to have an 'ignore' mask; the purpose of which is to 
ignore the held mouse button (report it as released) until the next press, 
which can either be internal for the GUI, or documented but reserved when the GUI 
is in use; 
2) instead, alter the GUI code to wrap gui_mouse_b() to support similar 
behavior.

A minor related suggestion, at least for while interfacing with the display 
can conflict with active menus, or while menu cancellation can block; adding a 
new function to report IF a menu is active, such as:

int gui_menu_is_active(void)
{
 return (active_menu_player) ? TRUE : FALSE;
}

Charles Bilyue'




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/