mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-03 22:51:06 +01:00 
			
		
		
		
	Tests: Added hook/tweaks for imgui-test engine. + Fixed warnings.
This commit is contained in:
		@@ -5133,7 +5133,7 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
 | 
			
		||||
        SetItemAllowOverlap();
 | 
			
		||||
 | 
			
		||||
    // In this branch, TreeNodeBehavior() cannot toggle the selection so this will never trigger.
 | 
			
		||||
    if (selected != was_selected)
 | 
			
		||||
    if (selected != was_selected) //-V547
 | 
			
		||||
        window->DC.LastItemStatusFlags |= ImGuiItemStatusFlags_ToggledSelection;
 | 
			
		||||
 | 
			
		||||
    // Render
 | 
			
		||||
@@ -5381,7 +5381,7 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
 | 
			
		||||
        SetItemAllowOverlap();
 | 
			
		||||
 | 
			
		||||
    // In this branch, Selectable() cannot toggle the selection so this will never trigger.
 | 
			
		||||
    if (selected != was_selected)
 | 
			
		||||
    if (selected != was_selected) //-V547
 | 
			
		||||
        window->DC.LastItemStatusFlags |= ImGuiItemStatusFlags_ToggledSelection;
 | 
			
		||||
 | 
			
		||||
    // Render
 | 
			
		||||
@@ -5405,6 +5405,8 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
 | 
			
		||||
    // Automatically close popups
 | 
			
		||||
    if (pressed && (window->Flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiSelectableFlags_DontClosePopups) && !(window->DC.ItemFlags & ImGuiItemFlags_SelectableDontClosePopup))
 | 
			
		||||
        CloseCurrentPopup();
 | 
			
		||||
 | 
			
		||||
    IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags);
 | 
			
		||||
    return pressed;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -5756,6 +5758,7 @@ ImGuiMenuColumns::ImGuiMenuColumns()
 | 
			
		||||
void ImGuiMenuColumns::Update(int count, float spacing, bool clear)
 | 
			
		||||
{
 | 
			
		||||
    IM_ASSERT(count == IM_ARRAYSIZE(Pos));
 | 
			
		||||
    IM_UNUSED(count);
 | 
			
		||||
    Width = NextWidth = 0.0f;
 | 
			
		||||
    Spacing = spacing;
 | 
			
		||||
    if (clear)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user