Skip to content

Commit

Permalink
Bugfix imgui can now interact on resized window
Browse files Browse the repository at this point in the history
  • Loading branch information
Angar0Os committed Nov 19, 2024
1 parent 30adda6 commit 284c655
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions imgui_basic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ hg.ImGuiInit(10, imgui_prg, imgui_img_prg)

-- main loop
while not hg.ReadKeyboard():Key(hg.K_Escape) and hg.IsWindowOpen(win) do
render_was_reset, res_x, res_y = hg.RenderResetToWindow(win, res_x, res_y, hg.RF_VSync)
hg.ImGuiBeginFrame(res_x, res_y, hg.TickClock(), hg.ReadMouse(), hg.ReadKeyboard())

if hg.ImGuiBegin('Window') then
Expand Down
1 change: 1 addition & 0 deletions imgui_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

# main loop
while not hg.ReadKeyboard().Key(hg.K_Escape) and hg.IsWindowOpen(win):
render_was_reset, res_x, res_y = hg.RenderResetToWindow(win, res_x, res_y, hg.RF_VSync)
hg.ImGuiBeginFrame(res_x, res_y, hg.TickClock(), hg.ReadMouse(), hg.ReadKeyboard())

if hg.ImGuiBegin('Window'):
Expand Down
1 change: 1 addition & 0 deletions imgui_edit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ imgui_clear_color_preset = 0

-- main loop
while not hg.ReadKeyboard():Key(hg.K_Escape) and hg.IsWindowOpen(win) do
render_was_reset, res_x, res_y = hg.RenderResetToWindow(win, res_x, res_y, hg.RF_VSync)
dt = hg.TickClock()

-- ImGui frame
Expand Down
1 change: 1 addition & 0 deletions imgui_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

# main loop
while not hg.ReadKeyboard().Key(hg.K_Escape) and hg.IsWindowOpen(win):
render_was_reset, res_x, res_y = hg.RenderResetToWindow(win, res_x, res_y, hg.RF_VSync)
dt = hg.TickClock()

# ImGui frame
Expand Down
1 change: 1 addition & 0 deletions imgui_mouse_capture.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ mouse = hg.Mouse()
keyboard = hg.Keyboard()

while not hg.ReadKeyboard():Key(hg.K_Escape) and hg.IsWindowOpen(win) do
render_was_reset, res_x, res_y = hg.RenderResetToWindow(win, res_x, res_y, hg.RF_VSync)
mouse:Update()
keyboard:Update()

Expand Down
1 change: 1 addition & 0 deletions imgui_mouse_capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
keyboard = hg.Keyboard()

while not hg.ReadKeyboard().Key(hg.K_Escape) and hg.IsWindowOpen(win):
render_was_reset, res_x, res_y = hg.RenderResetToWindow(win, res_x, res_y, hg.RF_VSync)
mouse.Update()
keyboard.Update()

Expand Down

0 comments on commit 284c655

Please sign in to comment.