floatextra=ImClamp(fabsf(ta.x-tb.x)*0.30f,5.0f,30.0f);// add a bit of extra slack.
ta.x+=(window->Pos.x<next_window->Pos.x)?-0.5f:+0.5f;// to avoid numerical issues
tb.y=ta.y+ImMax((tb.y-extra)-ta.y,-100.0f);// triangle is maximum 200 high to limit the slope and the bias toward large sub-menus
tb.y=ta.y+ImMax((tb.y-extra)-ta.y,-100.0f);// triangle is maximum 200 high to limit the slope and the bias toward large sub-menus // FIXME: Multiply by fb_scale?
elseif(pressed||(hovered&&menuset_is_open&&!menu_is_open))// menu-bar: 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.. }'