Open vulcan-dev opened 1 year ago
@vulcan-dev It turns out that SetWindowFontScale
seems to be a deprecated function in master
. It looks like it's no longer possible to adjust scale per-window.
The author also gives a tutorial in the code stating what you should do instead to achieve a scalable UI:
[OBSOLETE] set font scale. Adjust IO.FontGlobalScale if you want to scale all windows. This is an old API! For correct scaling, prefer to reload font + rebuild ImFontAtlas + call style.ScaleAllSizes().
See https://github.com/ocornut/imgui/blob/7e03ae32403f85f6c86f0c884a8243e2e14e483f/imgui.h#L372
@vulcan-dev It turns out that
SetWindowFontScale
seems to be a deprecated function inmaster
. It looks like it's no longer possible to adjust scale per-window.The author also gives a tutorial in the code stating what you should do instead to achieve a scalable UI:
[OBSOLETE] set font scale. Adjust IO.FontGlobalScale if you want to scale all windows. This is an old API! For correct scaling, prefer to reload font + rebuild ImFontAtlas + call style.ScaleAllSizes().
See
https://github.com/ocornut/imgui/blob/7e03ae32403f85f6c86f0c884a8243e2e14e483f/imgui.h#L372
Perfect, I'll try that out later when I have time. Thanks for the help
Version/Branch of Dear ImGui: Version: 1.83 Branch: master
Back-end/Renderer/Compiler/OS Back-ends: imgui_impl_dx11.cpp Compiler: MSVC Operating System: Windows
My Issue/Question: I've got a scale slider and everything scales besides
InputText
, I expected it to scale as I think that's how it should work.Screenshots/Video Scale of 2: I'm drawing it in a child window, hence the border. I expect
InputText
to fill that area.Scale of 1:
Standalone, minimal, complete and verifiable example: