@ -5835,12 +5835,16 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
{
{
pressed = true ;
pressed = true ;
if ( flags & ImGuiButtonFlags_NoHoldingActiveID )
if ( flags & ImGuiButtonFlags_NoHoldingActiveID )
{
ClearActiveID ( ) ;
ClearActiveID ( ) ;
}
else
else
{
SetActiveID ( id , window ) ; // Hold on ID
SetActiveID ( id , window ) ; // Hold on ID
FocusWindow ( window ) ;
g . ActiveIdClickOffset = g . IO . MousePos - bb . Min ;
g . ActiveIdClickOffset = g . IO . MousePos - bb . Min ;
}
}
FocusWindow ( window ) ;
}
if ( ( flags & ImGuiButtonFlags_PressedOnRelease ) & & g . IO . MouseReleased [ 0 ] )
if ( ( flags & ImGuiButtonFlags_PressedOnRelease ) & & g . IO . MouseReleased [ 0 ] )
{
{
if ( ! ( ( flags & ImGuiButtonFlags_Repeat ) & & g . IO . MouseDownDurationPrev [ 0 ] > = g . IO . KeyRepeatDelay ) ) // Repeat mode trumps <on release>
if ( ! ( ( flags & ImGuiButtonFlags_Repeat ) & & g . IO . MouseDownDurationPrev [ 0 ] > = g . IO . KeyRepeatDelay ) ) // Repeat mode trumps <on release>