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
I am using imgui with SFML and im wondering if there is any automated way to set all the sizes and positions in reference to the window size. In sfml for instance when you setup the view and have any sprites rendering on the screen, after you resize the window, the sprites also resize accordingly. In imgui it seems that the widget sizes stay static no matter the window size. I am trying to avoid the problem where the ui appears different in size and positions on different screen resolutions, for example when i setup my widgets on 1920x1080, then all the widgets would appear smaller in 4k resolution. Is there any better way to do it than i did it here with the scaling factor? Its kinda painful to manually multiply everything by the scaling factor when you have a lot of widgets (i left the code that you can copy and run if you have imgui linked with sfml. If you dont have thos linked then just skip to the TLDR part marked with the comments)
Version/Branch of Dear ImGui:
Version 1.XX, Branch: XXX (master/docking/etc.)
Back-ends:
imgui_impl_XXX.cpp + imgui_impl_XXX.cpp
Compiler, OS:
Windows 10 + MSVC 2022
Full config/build information:
No response
Details:
I am using imgui with SFML and im wondering if there is any automated way to set all the sizes and positions in reference to the window size. In sfml for instance when you setup the view and have any sprites rendering on the screen, after you resize the window, the sprites also resize accordingly. In imgui it seems that the widget sizes stay static no matter the window size. I am trying to avoid the problem where the ui appears different in size and positions on different screen resolutions, for example when i setup my widgets on 1920x1080, then all the widgets would appear smaller in 4k resolution. Is there any better way to do it than i did it here with the scaling factor? Its kinda painful to manually multiply everything by the scaling factor when you have a lot of widgets (i left the code that you can copy and run if you have imgui linked with sfml. If you dont have thos linked then just skip to the TLDR part marked with the comments)
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: