mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-30 12:41:06 +01:00 
			
		
		
		
	Scrollbar: horizontal scrollbar demo allows to enable simultanaeous scrollbars on both axises.
This commit is contained in:
		| @@ -966,10 +966,12 @@ void ImGui::ShowTestWindow(bool* opened) | ||||
|         { | ||||
|             ImGui::Bullet(); ImGui::TextWrapped("Horizontal scrolling for a window has to be enabled explicitly via the ImGuiWindowFlags_HorizontalScrollbar flag."); | ||||
|             ImGui::Bullet(); ImGui::TextWrapped("You may want to explicitly specify content width by calling SetNextWindowContentWidth() before Begin()."); | ||||
|             static int lines = 7; | ||||
|             ImGui::SliderInt("Lines", &lines, 1, 15); | ||||
|             ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 3.0f); | ||||
|             ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(2.0f, 1.0f)); | ||||
|             ImGui::BeginChild("scrolling", ImVec2(0, ImGui::GetItemsLineHeightWithSpacing()*7 + 30), true, ImGuiWindowFlags_HorizontalScrollbar); | ||||
|             for (int line = 0; line < 7; line++) | ||||
|             for (int line = 0; line < lines; line++) | ||||
|             { | ||||
|                 // Display random stuff | ||||
|                 int num_buttons = 10 + ((line & 1) ? line * 9 : line * 3); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user