@ -8425,6 +8425,8 @@ bool ImGui::IsKeyPressed(ImGuiKey key, ImGuiID owner_id, ImGuiInputFlags flags)
if ( t < 0.0f )
return false ;
IM_ASSERT ( ( flags & ~ ImGuiInputFlags_SupportedByIsKeyPressed ) = = 0 ) ; // Passing flags not supported by this function!
if ( flags & ImGuiInputFlags_RepeatRateMask_ ) // Setting any _RepeatXXX option enables _Repeat
flags | = ImGuiInputFlags_Repeat ;
bool pressed = ( t = = 0.0f ) ;
if ( ! pressed & & ( flags & ImGuiInputFlags_Repeat ) ! = 0 )
@ -8483,7 +8485,7 @@ bool ImGui::IsMouseClicked(ImGuiMouseButton button, ImGuiID owner_id, ImGuiInput
const float t = g . IO . MouseDownDuration [ button ] ;
if ( t < 0.0f )
return false ;
IM_ASSERT ( ( flags & ~ ImGuiInputFlags_SupportedByIsKeyPress ed ) = = 0 ) ; // Passing flags not supported by this function!
IM_ASSERT ( ( flags & ~ ImGuiInputFlags_SupportedByIsMouseClick ed ) = = 0 ) ; // Passing flags not supported by this function! // FIXME: Could support RepeatRate and RepeatUntil flags here.
const bool repeat = ( flags & ImGuiInputFlags_Repeat ) ! = 0 ;
const bool pressed = ( t = = 0.0f ) | | ( repeat & & t > g . IO . KeyRepeatDelay & & CalcTypematicRepeatAmount ( t - g . IO . DeltaTime , t , g . IO . KeyRepeatDelay , g . IO . KeyRepeatRate ) > 0 ) ;