elseif(menu_is_open&&pressed&&menuset_is_open)// Menu bar: click an open menu again to close it
else
{
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
{
want_open=true;
}
elseif(g.NavId==id&&g.NavMoveRequest&&g.NavMoveDir==ImGuiDir_Down)// Menu bar: Nav-Down to open
{
{
g.NavMoveRequest=false;
// Menu bar
want_open=true;
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;
}
elseif(g.NavId==id&&g.NavMoveRequest&&g.NavMoveDir==ImGuiDir_Down)// Nav-Down to open
{
g.NavMoveRequest=false;
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.. }'
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.. }'
ImGuiButtonFlags_AlignTextBaseLine=1<<8,// vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled SmallButton(), not possible currently because of DC.CursorPosPrevLine
ImGuiButtonFlags_AlignTextBaseLine=1<<8,// vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled by SmallButton(), not possible currently because of DC.CursorPosPrevLine
ImGuiButtonFlags_NoKeyModifiers=1<<9,// disable interaction if a key modifier is held
ImGuiButtonFlags_NoKeyModifiers=1<<9,// disable interaction if a key modifier is held
ImGuiButtonFlags_AllowOverlapMode=1<<10,// require previous frame HoveredId to either match id or be null before being usable
ImGuiButtonFlags_AllowOverlapMode=1<<10,// require previous frame HoveredId to either match id or be null before being usable
ImGuiButtonFlags_NoNavOverride=1<<11// don't override navigation id when activated
ImGuiButtonFlags_NoNavOverride=1<<11// don't override navigation id when activated