mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
ImFontAtlas: Added TexDesiredWidth and tweaked default cheapo best-width choice(#327)
This commit is contained in:
parent
bc8eb5e9cf
commit
0abe668221
3 changed files with 6 additions and 6 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue