Added TextLink(), TextLinkOpenURL() hyperlink widgets. (#7660)

This commit is contained in:
ocornut
2024-07-02 16:58:07 +02:00
parent 0f63d3e916
commit 5496050f5f
7 changed files with 96 additions and 2 deletions

View File

@@ -439,7 +439,9 @@ void ImGui::ShowDemoWindow(bool* p_open)
ImGui::BulletText("See the ShowDemoWindow() code in imgui_demo.cpp. <- you are here!");
ImGui::BulletText("See comments in imgui.cpp.");
ImGui::BulletText("See example applications in the examples/ folder.");
ImGui::BulletText("Read the FAQ at https://www.dearimgui.com/faq/");
ImGui::BulletText("Read the FAQ at ");
ImGui::SameLine(0, 0);
ImGui::TextLinkOpenURL("https://www.dearimgui.com/faq/");
ImGui::BulletText("Set 'io.ConfigFlags |= NavEnableKeyboard' for keyboard controls.");
ImGui::BulletText("Set 'io.ConfigFlags |= NavEnableGamepad' for gamepad controls.");
@@ -6513,6 +6515,17 @@ void ImGui::ShowAboutWindow(bool* p_open)
}
IMGUI_DEMO_MARKER("Tools/About Dear ImGui");
ImGui::Text("Dear ImGui %s (%d)", IMGUI_VERSION, IMGUI_VERSION_NUM);
ImGui::TextLinkOpenURL("Homepage", "https://github.com/ocornut/imgui");
ImGui::SameLine();
ImGui::TextLinkOpenURL("FAQ", "https://github.com/ocornut/imgui/blob/master/docs/FAQ.md");
ImGui::SameLine();
ImGui::TextLinkOpenURL("Wiki", "https://github.com/ocornut/imgui/wiki");
ImGui::SameLine();
ImGui::TextLinkOpenURL("Releases", "https://github.com/ocornut/imgui/releases");
ImGui::SameLine();
ImGui::TextLinkOpenURL("Funding", "https://github.com/ocornut/imgui/wiki/Funding");
ImGui::Separator();
ImGui::Text("By Omar Cornut and all Dear ImGui contributors.");
ImGui::Text("Dear ImGui is licensed under the MIT License, see LICENSE for more information.");