britzl / extension-imgui

Dear ImGUI extension for Defold
MIT License
58 stars 19 forks source link

Added support for conditions in SetNextWindow* methods #30

Closed u546342 closed 1 year ago

u546342 commented 1 year ago

Hello, Bjorn. Thanks for the great extension.

About PR:

The parameter cond has been added to the SetNextWindow* methods. It is useful for setting the initial size of a window that the user can later modify.

For example:

imgui.set_next_window_size(500, 300, imgui.COND_FIRSTUSEEVER)
imgui.set_next_window_pos(100, 100, imgui.COND_FIRSTUSEEVER)

local is_active, is_open = imgui.begin_window("My Window", show)