britzl / extension-imgui

Dear ImGUI extension for Defold
MIT License
51 stars 17 forks source link

Getting an incremental size/padding of widgets while using this in monarch scene #42

Closed VikSin closed 4 months ago

VikSin commented 5 months ago

While showing and hiding monarch scene, size/padding gets incremented for widgets.

For test project check this - https://github.com/britzl/extension-imgui/files/14122267/imgui_test.zip

https://github.com/britzl/extension-imgui/assets/25245765/9b1ede5c-a424-43f7-96d9-c254b64ad7ce

britzl commented 4 months ago

You are scaling the UI by a factor of 2 every time imgui_manager.script is loaded.

    local scale = 2
    imgui.scale_all_sizes(scale)

You should only use imgui.scale_all_sizes() once on application startup.