@ -680,7 +680,7 @@ bool ImGui::ButtonEx(const char* label, const ImVec2& size_arg, ImGuiButtonFlags
if ( ! ItemAdd ( bb , id ) )
if ( ! ItemAdd ( bb , id ) )
return false ;
return false ;
if ( g . CurrentItem Flags & ImGuiItemFlags_ButtonRepeat )
if ( g . LastItemData. In Flags & ImGuiItemFlags_ButtonRepeat )
flags | = ImGuiButtonFlags_Repeat ;
flags | = ImGuiButtonFlags_Repeat ;
bool hovered , held ;
bool hovered , held ;
@ -757,7 +757,7 @@ bool ImGui::ArrowButtonEx(const char* str_id, ImGuiDir dir, ImVec2 size, ImGuiBu
if ( ! ItemAdd ( bb , id ) )
if ( ! ItemAdd ( bb , id ) )
return false ;
return false ;
if ( g . CurrentItem Flags & ImGuiItemFlags_ButtonRepeat )
if ( g . LastItemData. In Flags & ImGuiItemFlags_ButtonRepeat )
flags | = ImGuiButtonFlags_Repeat ;
flags | = ImGuiButtonFlags_Repeat ;
bool hovered , held ;
bool hovered , held ;
@ -1092,7 +1092,7 @@ bool ImGui::Checkbox(const char* label, bool* v)
RenderNavHighlight ( total_bb , id ) ;
RenderNavHighlight ( total_bb , id ) ;
RenderFrame ( check_bb . Min , check_bb . Max , GetColorU32 ( ( held & & hovered ) ? ImGuiCol_FrameBgActive : hovered ? ImGuiCol_FrameBgHovered : ImGuiCol_FrameBg ) , true , style . FrameRounding ) ;
RenderFrame ( check_bb . Min , check_bb . Max , GetColorU32 ( ( held & & hovered ) ? ImGuiCol_FrameBgActive : hovered ? ImGuiCol_FrameBgHovered : ImGuiCol_FrameBg ) , true , style . FrameRounding ) ;
ImU32 check_col = GetColorU32 ( ImGuiCol_CheckMark ) ;
ImU32 check_col = GetColorU32 ( ImGuiCol_CheckMark ) ;
bool mixed_value = ( g . CurrentItem Flags & ImGuiItemFlags_MixedValue ) ! = 0 ;
bool mixed_value = ( g . LastItemData. In Flags & ImGuiItemFlags_MixedValue ) ! = 0 ;
if ( mixed_value )
if ( mixed_value )
{
{
// Undocumented tristate/mixed/indeterminate checkbox (#2644)
// Undocumented tristate/mixed/indeterminate checkbox (#2644)
@ -2345,7 +2345,7 @@ bool ImGui::DragBehavior(ImGuiID id, ImGuiDataType data_type, void* p_v, float v
}
}
if ( g . ActiveId ! = id )
if ( g . ActiveId ! = id )
return false ;
return false ;
if ( ( g . CurrentItem Flags & ImGuiItemFlags_ReadOnly ) | | ( flags & ImGuiSliderFlags_ReadOnly ) )
if ( ( g . LastItemData. In Flags & ImGuiItemFlags_ReadOnly ) | | ( flags & ImGuiSliderFlags_ReadOnly ) )
return false ;
return false ;
switch ( data_type )
switch ( data_type )
@ -2949,7 +2949,7 @@ bool ImGui::SliderBehavior(const ImRect& bb, ImGuiID id, ImGuiDataType data_type
IM_ASSERT ( ( flags = = 1 | | ( flags & ImGuiSliderFlags_InvalidMask_ ) = = 0 ) & & " Invalid ImGuiSliderFlags flag! Has the 'float power' argument been mistakenly cast to flags? Call function with ImGuiSliderFlags_Logarithmic flags instead. " ) ;
IM_ASSERT ( ( flags = = 1 | | ( flags & ImGuiSliderFlags_InvalidMask_ ) = = 0 ) & & " Invalid ImGuiSliderFlags flag! Has the 'float power' argument been mistakenly cast to flags? Call function with ImGuiSliderFlags_Logarithmic flags instead. " ) ;
ImGuiContext & g = * GImGui ;
ImGuiContext & g = * GImGui ;
if ( ( g . CurrentItem Flags & ImGuiItemFlags_ReadOnly ) | | ( flags & ImGuiSliderFlags_ReadOnly ) )
if ( ( g . LastItemData. In Flags & ImGuiItemFlags_ReadOnly ) | | ( flags & ImGuiSliderFlags_ReadOnly ) )
return false ;
return false ;
switch ( data_type )
switch ( data_type )
@ -6157,7 +6157,7 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
return false ;
return false ;
const bool disabled_global = ( g . CurrentItemFlags & ImGuiItemFlags_Disabled ) ! = 0 ;
const bool disabled_global = ( g . CurrentItemFlags & ImGuiItemFlags_Disabled ) ! = 0 ;
if ( disabled_item & & ! disabled_global )
if ( disabled_item & & ! disabled_global ) // Only testing this as an optimization
PushDisabled ( true ) ;
PushDisabled ( true ) ;
// FIXME: We can standardize the behavior of those two, we could also keep the fast path of override ClipRect + full push on render only,
// FIXME: We can standardize the behavior of those two, we could also keep the fast path of override ClipRect + full push on render only,
@ -6227,7 +6227,7 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
RenderTextClipped ( text_min , text_max , label , NULL , & label_size , style . SelectableTextAlign , & bb ) ;
RenderTextClipped ( text_min , text_max , label , NULL , & label_size , style . SelectableTextAlign , & bb ) ;
// Automatically close popups
// Automatically close popups
if ( pressed & & ( window - > Flags & ImGuiWindowFlags_Popup ) & & ! ( flags & ImGuiSelectableFlags_DontClosePopups ) & & ! ( g . CurrentItem Flags & ImGuiItemFlags_SelectableDontClosePopup ) )
if ( pressed & & ( window - > Flags & ImGuiWindowFlags_Popup ) & & ! ( flags & ImGuiSelectableFlags_DontClosePopups ) & & ! ( g . LastItemData. In Flags & ImGuiItemFlags_SelectableDontClosePopup ) )
CloseCurrentPopup ( ) ;
CloseCurrentPopup ( ) ;
if ( disabled_item & & ! disabled_global )
if ( disabled_item & & ! disabled_global )