mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Examples: Simplified font examples comments.
This commit is contained in:
parent
815168c7ef
commit
fcec337061
@ -150,12 +150,12 @@ int main(int, char**)
|
|||||||
// Setup ImGui binding
|
// Setup ImGui binding
|
||||||
ImGui_ImplDX11_Init(hwnd, g_pd3dDevice, g_pd3dDeviceContext);
|
ImGui_ImplDX11_Init(hwnd, g_pd3dDevice, g_pd3dDeviceContext);
|
||||||
//ImGuiIO& io = ImGui::GetIO();
|
//ImGuiIO& io = ImGui::GetIO();
|
||||||
//ImFont* my_font0 = io.Fonts->AddFontDefault();
|
//io.Fonts->AddFontDefault();
|
||||||
//ImFont* my_font1 = io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
||||||
//ImFont* my_font2 = io.Fonts->AddFontFromFileTTF("../../extra_fonts/Karla-Regular.ttf", 16.0f);
|
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Karla-Regular.ttf", 16.0f);
|
||||||
//ImFont* my_font3 = io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f); my_font3->DisplayOffset.y += 1;
|
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f);
|
||||||
//ImFont* my_font4 = io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f); my_font4->DisplayOffset.y += 1;
|
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f);
|
||||||
//ImFont* my_font5 = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, io.Fonts->GetGlyphRangesJapanese());
|
//io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
|
||||||
|
|
||||||
bool show_test_window = true;
|
bool show_test_window = true;
|
||||||
bool show_another_window = false;
|
bool show_another_window = false;
|
||||||
|
@ -74,12 +74,12 @@ int main(int, char**)
|
|||||||
// Setup ImGui binding
|
// Setup ImGui binding
|
||||||
ImGui_ImplDX9_Init(hwnd, g_pd3dDevice);
|
ImGui_ImplDX9_Init(hwnd, g_pd3dDevice);
|
||||||
//ImGuiIO& io = ImGui::GetIO();
|
//ImGuiIO& io = ImGui::GetIO();
|
||||||
//ImFont* my_font0 = io.Fonts->AddFontDefault();
|
//io.Fonts->AddFontDefault();
|
||||||
//ImFont* my_font1 = io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
||||||
//ImFont* my_font2 = io.Fonts->AddFontFromFileTTF("../../extra_fonts/Karla-Regular.ttf", 16.0f);
|
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Karla-Regular.ttf", 16.0f);
|
||||||
//ImFont* my_font3 = io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f); my_font3->DisplayOffset.y += 1;
|
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f);
|
||||||
//ImFont* my_font4 = io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f); my_font4->DisplayOffset.y += 1;
|
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f);
|
||||||
//ImFont* my_font5 = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, io.Fonts->GetGlyphRangesJapanese());
|
//io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
|
||||||
|
|
||||||
ShowWindow(hwnd, SW_SHOWDEFAULT);
|
ShowWindow(hwnd, SW_SHOWDEFAULT);
|
||||||
UpdateWindow(hwnd);
|
UpdateWindow(hwnd);
|
||||||
|
@ -30,12 +30,12 @@ int main(int, char**)
|
|||||||
// Setup ImGui binding
|
// Setup ImGui binding
|
||||||
ImGui_ImplGlfwGL3_Init(window, true);
|
ImGui_ImplGlfwGL3_Init(window, true);
|
||||||
//ImGuiIO& io = ImGui::GetIO();
|
//ImGuiIO& io = ImGui::GetIO();
|
||||||
//ImFont* my_font0 = io.Fonts->AddFontDefault();
|
//io.Fonts->AddFontDefault();
|
||||||
//ImFont* my_font1 = io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
||||||
//ImFont* my_font2 = io.Fonts->AddFontFromFileTTF("../../extra_fonts/Karla-Regular.ttf", 16.0f);
|
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Karla-Regular.ttf", 16.0f);
|
||||||
//ImFont* my_font3 = io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f); my_font3->DisplayOffset.y += 1;
|
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f);
|
||||||
//ImFont* my_font4 = io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f); my_font4->DisplayOffset.y += 1;
|
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f);
|
||||||
//ImFont* my_font5 = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, io.Fonts->GetGlyphRangesJapanese());
|
//io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
|
||||||
|
|
||||||
bool show_test_window = true;
|
bool show_test_window = true;
|
||||||
bool show_another_window = false;
|
bool show_another_window = false;
|
||||||
|
@ -22,12 +22,12 @@ int main(int, char**)
|
|||||||
// Setup ImGui binding
|
// Setup ImGui binding
|
||||||
ImGui_ImplGlfw_Init(window, true);
|
ImGui_ImplGlfw_Init(window, true);
|
||||||
//ImGuiIO& io = ImGui::GetIO();
|
//ImGuiIO& io = ImGui::GetIO();
|
||||||
//ImFont* my_font0 = io.Fonts->AddFontDefault();
|
//io.Fonts->AddFontDefault();
|
||||||
//ImFont* my_font1 = io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
||||||
//ImFont* my_font2 = io.Fonts->AddFontFromFileTTF("../../extra_fonts/Karla-Regular.ttf", 16.0f);
|
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Karla-Regular.ttf", 16.0f);
|
||||||
//ImFont* my_font3 = io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f); my_font3->DisplayOffset.y += 1;
|
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f);
|
||||||
//ImFont* my_font4 = io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f); my_font4->DisplayOffset.y += 1;
|
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f);
|
||||||
//ImFont* my_font5 = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, io.Fonts->GetGlyphRangesJapanese());
|
//io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
|
||||||
|
|
||||||
bool show_test_window = true;
|
bool show_test_window = true;
|
||||||
bool show_another_window = false;
|
bool show_another_window = false;
|
||||||
|
@ -11231,7 +11231,7 @@ void ImGui::ShowTestWindow(bool* opened)
|
|||||||
|
|
||||||
if (ImGui::TreeNode("Fonts", "Fonts (%d)", ImGui::GetIO().Fonts->Fonts.Size))
|
if (ImGui::TreeNode("Fonts", "Fonts (%d)", ImGui::GetIO().Fonts->Fonts.Size))
|
||||||
{
|
{
|
||||||
ImGui::TextWrapped("Tip: Load fonts with GetIO().Fonts->AddFontFromFileTTF().");
|
ImGui::TextWrapped("Tip: Load fonts with io.Fonts->AddFontFromFileTTF().");
|
||||||
ImFontAtlas* atlas = ImGui::GetIO().Fonts;
|
ImFontAtlas* atlas = ImGui::GetIO().Fonts;
|
||||||
if (ImGui::TreeNode("Atlas texture"))
|
if (ImGui::TreeNode("Atlas texture"))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user