We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version/Branch of Dear ImGui:
Version: 1.88 Branch: master
My Issue/Question:
Hi, I am interested to know if we can add hyperlinks (url) to open up using Imgui
eg:
Press button widget -> open up a webpage (for example google)
Sorry that i cannot provide any information, but if there is an API to get this feature, please do share
The text was updated successfully, but these errors were encountered:
Opening a webpage or external applications is out of the scope of Dear ImGui.
If I type "how to open a webpage in imgui" on google I stumble on this question: https://stackoverflow.com/questions/71712920/how-to-open-a-webpage-in-imgui
Which I have answered myself, and copying answer here:
It's not really a dear imgui question, more about how to use your OS API to perform that.
Something like that would work:
void OsOpenInShell(const char* path) { #ifdef _WIN32 // Note: executable path must use backslashes! ::ShellExecuteA(NULL, "open", path, NULL, NULL, SW_SHOWDEFAULT); #else #if __APPLE__ const char* open_executable = "open"; #else const char* open_executable = "xdg-open"; #endif char command[256]; snprintf(command, 256, "%s \"%s\"", open_executable, path); system(command); #endif }
Sorry, something went wrong.
This was formalized today in a portable manner with the io.PlatformOpenInShellFn handler and new TextLinkOpenURL() widget, see #7660 (comment)
io.PlatformOpenInShellFn
TextLinkOpenURL()
No branches or pull requests
Version/Branch of Dear ImGui:
Version: 1.88
Branch: master
My Issue/Question:
Hi, I am interested to know if we can add hyperlinks (url) to open up using Imgui
eg:
Press button widget -> open up a webpage (for example google)
Sorry that i cannot provide any information, but if there is an API to get this feature, please do share
The text was updated successfully, but these errors were encountered: