mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-30 20:51:06 +01:00 
			
		
		
		
	Texture-based thick lines: Fixes for AddCustomRect api, add IMGUI_HAS_TEXLINES define (temporarily) to facilitate working with test cases, Demo allows growing FrameBorderSize for testing
This commit is contained in:
		
							
								
								
									
										2
									
								
								imgui.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								imgui.h
									
									
									
									
									
								
							| @@ -1993,6 +1993,8 @@ enum ImDrawCornerFlags_ | ||||
|     ImDrawCornerFlags_All       = 0xF     // In your function calls you may use ~0 (= all bits sets) instead of ImDrawCornerFlags_All, as a convenience | ||||
| }; | ||||
|  | ||||
| #define IMGUI_HAS_TEXLINES      1 | ||||
|  | ||||
| enum ImDrawListFlags_ | ||||
| { | ||||
|     ImDrawListFlags_None                    = 0, | ||||
|   | ||||
| @@ -3698,7 +3698,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) | ||||
|             ImGui::SliderFloat("WindowBorderSize", &style.WindowBorderSize, 0.0f, 1.0f, "%.0f"); | ||||
|             ImGui::SliderFloat("ChildBorderSize", &style.ChildBorderSize, 0.0f, 1.0f, "%.0f"); | ||||
|             ImGui::SliderFloat("PopupBorderSize", &style.PopupBorderSize, 0.0f, 1.0f, "%.0f"); | ||||
|             ImGui::SliderFloat("FrameBorderSize", &style.FrameBorderSize, 0.0f, 1.0f, "%.0f"); | ||||
|             ImGui::SliderFloat("FrameBorderSize", &style.FrameBorderSize, 0.0f, 4.0f, "%.1f"); | ||||
|             ImGui::SliderFloat("TabBorderSize", &style.TabBorderSize, 0.0f, 1.0f, "%.0f"); | ||||
|             ImGui::Text("Rounding"); | ||||
|             ImGui::SliderFloat("WindowRounding", &style.WindowRounding, 0.0f, 12.0f, "%.0f"); | ||||
|   | ||||
| @@ -2393,8 +2393,8 @@ static void ImFontAtlasBuildRegisterAALineCustomRects(ImFontAtlas* atlas) | ||||
|     if ((atlas->Flags & ImFontAtlasFlags_NoAALines)) | ||||
|         return; | ||||
|  | ||||
|     const int max_width = IM_DRAWLIST_TEX_AA_LINES_WIDTH_MAX; // The maximum line width we want to generate | ||||
|     // The "max_width + 2" here is to give space for the end caps, whilst height (IM_DRAWLIST_TEX_AA_LINES_WIDTH_MAX+1) is to accommodate the fact we have a zero-width row | ||||
|     const int max_width = IM_DRAWLIST_TEX_AA_LINES_WIDTH_MAX; // The maximum line width we want to generate | ||||
|     atlas->AALineRectId = atlas->AddCustomRectRegular(max_width + 2, IM_DRAWLIST_TEX_AA_LINES_WIDTH_MAX + 1); | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user