You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler: MSVC
Operating System: Windows 10
Is it possible to add window icons to Imgui viewports?
I am currently running the following code inside ImGui_ImplGlfw_CreateWindow()
to add icons. But it would be nice if an api was provided to set a default icon
I am not sure it is easy or possible to provide a cross platform API for that without dragging in a lots of things. I think we should let the user implement it themselves in particular because I would expect some application may even want to have different icon depending on the content of the viewport.
For now my suggestion is to avoid modifying ImGui_ImplGlfw_CreateWindow():
Instead you can replace the Platform_CreateWindow or Platform_ShowWindow field of ImGuiPlatformIO. Save the previous handler, register yours instead. In your handler call the previous handler and then do your icon loading (if you do it in Platform_CreateWindow do it after calling the original handler, if you do it in Platform_ShowWindow do it first).
Open to other suggestions but I think this would be the path of least resistance and more flexibility for now.
Version/Branch of Dear ImGui:
Version: v1.72b
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler: MSVC
Operating System: Windows 10
Is it possible to add window icons to Imgui viewports?
I am currently running the following code inside ImGui_ImplGlfw_CreateWindow()
to add icons. But it would be nice if an api was provided to set a default icon
Screenshots/Video
The text was updated successfully, but these errors were encountered: