mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-30 20:51:06 +01:00 
			
		
		
		
	Demo: Tweaks format.
This commit is contained in:
		| @@ -1061,7 +1061,9 @@ void ImGui::ShowDemoWindow(bool* p_open) | |||||||
|             goto_line |= ImGui::InputInt("##Line", &line, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue); |             goto_line |= ImGui::InputInt("##Line", &line, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue); | ||||||
|             ImGui::PopItemWidth(); |             ImGui::PopItemWidth(); | ||||||
|  |  | ||||||
|             ImGui::BeginChild("Sub1", ImVec2(ImGui::GetWindowContentRegionWidth() * 0.5f,300), false, ImGuiWindowFlags_HorizontalScrollbar | (disable_mouse_wheel ? ImGuiWindowFlags_NoScrollWithMouse : 0)); |             // Child 1: no border, enable horizontal scrollbar | ||||||
|  |             { | ||||||
|  |                 ImGui::BeginChild("Child1", ImVec2(ImGui::GetWindowContentRegionWidth() * 0.5f, 300), false, ImGuiWindowFlags_HorizontalScrollbar | (disable_mouse_wheel ? ImGuiWindowFlags_NoScrollWithMouse : 0)); | ||||||
|                 for (int i = 0; i < 100; i++) |                 for (int i = 0; i < 100; i++) | ||||||
|                 { |                 { | ||||||
|                     ImGui::Text("%04d: scrollable region", i); |                     ImGui::Text("%04d: scrollable region", i); | ||||||
| @@ -1071,11 +1073,14 @@ void ImGui::ShowDemoWindow(bool* p_open) | |||||||
|                 if (goto_line && line >= 100) |                 if (goto_line && line >= 100) | ||||||
|                     ImGui::SetScrollHere(); |                     ImGui::SetScrollHere(); | ||||||
|                 ImGui::EndChild(); |                 ImGui::EndChild(); | ||||||
|  |             } | ||||||
|  |  | ||||||
|             ImGui::SameLine(); |             ImGui::SameLine(); | ||||||
|  |  | ||||||
|  |             // Child 2: rounded border | ||||||
|  |             { | ||||||
|                 ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 5.0f); |                 ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 5.0f); | ||||||
|             ImGui::BeginChild("Sub2", ImVec2(0,300), true, (disable_mouse_wheel ? ImGuiWindowFlags_NoScrollWithMouse : 0)); |                 ImGui::BeginChild("Child2", ImVec2(0,300), true, (disable_mouse_wheel ? ImGuiWindowFlags_NoScrollWithMouse : 0)); | ||||||
|                 ImGui::Text("With border"); |                 ImGui::Text("With border"); | ||||||
|                 ImGui::Columns(2); |                 ImGui::Columns(2); | ||||||
|                 for (int i = 0; i < 100; i++) |                 for (int i = 0; i < 100; i++) | ||||||
| @@ -1088,6 +1093,7 @@ void ImGui::ShowDemoWindow(bool* p_open) | |||||||
|                 } |                 } | ||||||
|                 ImGui::EndChild(); |                 ImGui::EndChild(); | ||||||
|                 ImGui::PopStyleVar(); |                 ImGui::PopStyleVar(); | ||||||
|  |             } | ||||||
|  |  | ||||||
|             ImGui::TreePop(); |             ImGui::TreePop(); | ||||||
|         } |         } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user