mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Demo: Fix using ambiguous InputFloat() call which redirect to obsolete version. (#1990)
This commit is contained in:
parent
65b46f62ef
commit
671e516377
@ -2493,8 +2493,8 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
|
|||||||
ImGui::Text("The quick brown fox jumps over the lazy dog");
|
ImGui::Text("The quick brown fox jumps over the lazy dog");
|
||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
ImGui::DragFloat("Font scale", &font->Scale, 0.005f, 0.3f, 2.0f, "%.1f"); // Scale only this font
|
ImGui::DragFloat("Font scale", &font->Scale, 0.005f, 0.3f, 2.0f, "%.1f"); // Scale only this font
|
||||||
ImGui::InputFloat("Font offset", &font->DisplayOffset.y, 1, 1, 0);
|
|
||||||
ImGui::SameLine(); ShowHelpMarker("Note than the default embedded font is NOT meant to be scaled.\n\nFont are currently rendered into bitmaps at a given size at the time of building the atlas. You may oversample them to get some flexibility with scaling. You can also render at multiple sizes and select which one to use at runtime.\n\n(Glimmer of hope: the atlas system should hopefully be rewritten in the future to make scaling more natural and automatic.)");
|
ImGui::SameLine(); ShowHelpMarker("Note than the default embedded font is NOT meant to be scaled.\n\nFont are currently rendered into bitmaps at a given size at the time of building the atlas. You may oversample them to get some flexibility with scaling. You can also render at multiple sizes and select which one to use at runtime.\n\n(Glimmer of hope: the atlas system should hopefully be rewritten in the future to make scaling more natural and automatic.)");
|
||||||
|
ImGui::InputFloat("Font offset", &font->DisplayOffset.y, 1, 1, "%.0f");
|
||||||
ImGui::Text("Ascent: %f, Descent: %f, Height: %f", font->Ascent, font->Descent, font->Ascent - font->Descent);
|
ImGui::Text("Ascent: %f, Descent: %f, Height: %f", font->Ascent, font->Descent, font->Ascent - font->Descent);
|
||||||
ImGui::Text("Fallback character: '%c' (%d)", font->FallbackChar, font->FallbackChar);
|
ImGui::Text("Fallback character: '%c' (%d)", font->FallbackChar, font->FallbackChar);
|
||||||
ImGui::Text("Texture surface: %d pixels (approx) ~ %dx%d", font->MetricsTotalSurface, (int)sqrtf((float)font->MetricsTotalSurface), (int)sqrtf((float)font->MetricsTotalSurface));
|
ImGui::Text("Texture surface: %d pixels (approx) ~ %dx%d", font->MetricsTotalSurface, (int)sqrtf((float)font->MetricsTotalSurface), (int)sqrtf((float)font->MetricsTotalSurface));
|
||||||
|
Loading…
Reference in New Issue
Block a user