elseif(menu_is_open&&pressed&&menuset_is_open)// Menu bar: click an open menu again to close it
{
want_close=true;
want_open=menu_is_open=false;
}
elseif(pressed||(hovered&&menuset_is_open&&!menu_is_open))// menu-bar: first click to open, then hover to open others
else
{
want_open=true;
// Menu bar
if(menu_is_open&&pressed&&menuset_is_open)// Click an open menu again to close it
{
want_close=true;
want_open=menu_is_open=false;
}
elseif(pressed||(hovered&&menuset_is_open&&!menu_is_open))// First click to open, then hover to open others
{
want_open=true;
}
}
if(!enabled)// explicitly close if an open menu becomes disabled, facilitate users code a lot in pattern such as 'if (BeginMenu("options", has_object)) { ..use object.. }'