mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-04 07:01:04 +01:00 
			
		
		
		
	Tables: Made TableHeader() responsible for opening per-column context menu to move responsibility away from TableAutoHeaders().
This commit is contained in:
		@@ -3960,13 +3960,12 @@ static void ShowDemoWindowTables()
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Demonstrate using TableHeader() calls instead of TableAutoHeaders()
 | 
			
		||||
    // FIXME-TABLE: Currently this doesn't get us feature-parity with TableAutoHeaders(), e.g. missing context menu.  Tables API needs some work!
 | 
			
		||||
    if (open_action != -1)
 | 
			
		||||
        ImGui::SetNextItemOpen(open_action != 0);
 | 
			
		||||
    if (ImGui::TreeNode("Custom headers"))
 | 
			
		||||
    {
 | 
			
		||||
        const int COLUMNS_COUNT = 3;
 | 
			
		||||
        if (ImGui::BeginTable("##table1", COLUMNS_COUNT, ImGuiTableFlags_Borders | ImGuiTableFlags_Reorderable))
 | 
			
		||||
        if (ImGui::BeginTable("##table1", COLUMNS_COUNT, ImGuiTableFlags_Borders | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable))
 | 
			
		||||
        {
 | 
			
		||||
            ImGui::TableSetupColumn("Apricot");
 | 
			
		||||
            ImGui::TableSetupColumn("Banana");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user