mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-13 00:09:55 +02:00
ImFontAtlas: Added TexDesiredWidth and tweaked default cheapo best-width choice(#327)
This commit is contained in:
@ -206,9 +206,8 @@ void ImGui::ShowTestWindow(bool* opened)
|
||||
{
|
||||
ImGui::TextWrapped("Tip: Load fonts with io.Fonts->AddFontFromFileTTF().");
|
||||
ImFontAtlas* atlas = ImGui::GetIO().Fonts;
|
||||
if (ImGui::TreeNode("Atlas texture"))
|
||||
if (ImGui::TreeNode("Atlas texture", "Atlas texture (%dx%d pixels)", atlas->TexWidth, atlas->TexHeight))
|
||||
{
|
||||
ImGui::Text("%dx%d pixels", atlas->TexWidth, atlas->TexHeight);
|
||||
ImGui::Image(atlas->TexID, ImVec2((float)atlas->TexWidth, (float)atlas->TexHeight), ImVec2(0,0), ImVec2(1,1), ImColor(255,255,255,255), ImColor(255,255,255,128));
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
Reference in New Issue
Block a user