mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 13:11:05 +01:00 
			
		
		
		
	Demo: Fixed Fonts "set as default button" not having collading id on collapsed nodes.
This commit is contained in:
		| @@ -1951,6 +1951,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) | ||||
|         for (int i = 0; i < atlas->Fonts.Size; i++) | ||||
|         { | ||||
|             ImFont* font = atlas->Fonts[i]; | ||||
|             ImGui::PushID(font); | ||||
|             bool font_details_opened = ImGui::TreeNode(font, "Font %d: \'%s\', %.2f px, %d glyphs", i, font->ConfigData ? font->ConfigData[0].Name : "", font->FontSize, font->Glyphs.Size); | ||||
|             ImGui::SameLine(); if (ImGui::SmallButton("Set as default")) ImGui::GetIO().FontDefault = font; | ||||
|             if (font_details_opened) | ||||
| @@ -2011,6 +2012,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) | ||||
|                 } | ||||
|                 ImGui::TreePop(); | ||||
|             } | ||||
|             ImGui::PopID(); | ||||
|         } | ||||
|         static float window_scale = 1.0f; | ||||
|         ImGui::DragFloat("this window scale", &window_scale, 0.005f, 0.3f, 2.0f, "%.1f");              // scale only this window | ||||
|   | ||||
		Reference in New Issue
	
	Block a user