浏览代码

Demo: Exposed some basic UI in demo for sanity.

ocornut 6 月之前
父节点
当前提交
735d31e54a
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11 0
      imgui_demo.cpp

+ 11 - 0
imgui_demo.cpp

@@ -430,6 +430,17 @@ void ImGui::ShowDemoWindow(bool* p_open)
     ImGui::Text("dear imgui says hello! (%s) (%d)", IMGUI_VERSION, IMGUI_VERSION_NUM);
     ImGui::Text("dear imgui says hello! (%s) (%d)", IMGUI_VERSION, IMGUI_VERSION_NUM);
     ImGui::Spacing();
     ImGui::Spacing();
 
 
+    ImGui::SeparatorText("dynamic_fonts branch");
+    ImGui::SetNextItemWidth(ImGui::GetFontSize() * 5);
+    ImGui::DragFloat("io.FontGlobalScale", &ImGui::GetIO().FontGlobalScale, 0.05f, 0.5f, 5.0f);
+    ImGui::BulletText("This is scaling font only. General scaling will come later.");
+    ImGui::BulletText("Load an actual font that's not the default for best result!");
+    ImGui::BulletText("See 'Widgets->Fonts' below for more..");
+    ImGui::BulletText("Current font loader: '%s'", ImGui::GetIO().Fonts->FontLoaderName);
+    ImGui::BulletText("Please submit feedback:"); ImGui::SameLine();
+    ImGui::TextLinkOpenURL("https://github.com/ocornut/imgui/issues/8465");
+    ImGui::Spacing();
+
     IMGUI_DEMO_MARKER("Help");
     IMGUI_DEMO_MARKER("Help");
     if (ImGui::CollapsingHeader("Help"))
     if (ImGui::CollapsingHeader("Help"))
     {
     {