mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 21:21:06 +01:00 
			
		
		
		
	Tables: fixed propagation of line height from outside the table. Added outer-width demo.
This commit is contained in:
		| @@ -4215,6 +4215,41 @@ static void ShowDemoWindowTables() | ||||
|         ImGui::TreePop(); | ||||
|     } | ||||
|  | ||||
|  | ||||
|     if (open_action != -1) | ||||
|         ImGui::SetNextItemOpen(open_action != 0); | ||||
|     if (ImGui::TreeNode("Outer size")) | ||||
|     { | ||||
|         if (ImGui::BeginTable("##table1", 3, ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg, ImVec2(TEXT_BASE_WIDTH * 30, 0.0f))) | ||||
|         { | ||||
|             for (int row = 0; row < 5; row++) | ||||
|             { | ||||
|                 ImGui::TableNextRow(); | ||||
|                 for (int column = 0; column < 3; column++) | ||||
|                 { | ||||
|                     ImGui::TableNextColumn(); | ||||
|                     ImGui::Text("Cell %d,%d", column, row); | ||||
|                 } | ||||
|             } | ||||
|             ImGui::EndTable(); | ||||
|         } | ||||
|         ImGui::SameLine(); | ||||
|         if (ImGui::BeginTable("##table2", 3, ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg, ImVec2(TEXT_BASE_WIDTH * 30, 0.0f))) | ||||
|         { | ||||
|             for (int row = 0; row < 3; row++) | ||||
|             { | ||||
|                 ImGui::TableNextRow(0, TEXT_BASE_HEIGHT * 1.5f); | ||||
|                 for (int column = 0; column < 3; column++) | ||||
|                 { | ||||
|                     ImGui::TableNextColumn(); | ||||
|                     ImGui::Text("Cell %d,%d", column, row); | ||||
|                 } | ||||
|             } | ||||
|             ImGui::EndTable(); | ||||
|         } | ||||
|         ImGui::TreePop(); | ||||
|     } | ||||
|  | ||||
|     if (open_action != -1) | ||||
|         ImGui::SetNextItemOpen(open_action != 0); | ||||
|     if (ImGui::TreeNode("Background color")) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user