我到处都找过了,但似乎找不到解决我的问题的方法。我想知道如何使用 imgui 打开弹出窗口并使用“https://google.com”等网站打开 chrome 窗口。我认为 ImGui::OpenPopup 可能会起作用,但后来我查看了该函数,然后在谷歌上查看,似乎它不起作用。当您单击一个按钮时,它会重定向到计算机上的一个窗口,就像您单击不和谐中的链接时,它会在您的计算机上打开一个谷歌选项卡。
我认为它可能看起来有点像这样
void GUI::renderAboutMenu() noexcept
{
if (ImGui::MenuItem("My Discord"))
openWebsite("https://discord.gg/myinvitecode");
if (ImGui::MenuItem("My Patreon"))
openWebsite("https://patreon.com/myinvitecode");
}
Run Code Online (Sandbox Code Playgroud) imgui ×1