diff --git a/.gitignore b/.gitignore index 23f3fd7..36ec8b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ /resources_compiled /_bin /assetc-ubuntu-x64-2.3.0 -screenshots/.png diff --git a/imgui_basic.lua b/imgui_basic.lua index 77c6a48..7451cd5 100644 --- a/imgui_basic.lua +++ b/imgui_basic.lua @@ -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 diff --git a/imgui_basic.py b/imgui_basic.py index 0037e6a..69cac17 100644 --- a/imgui_basic.py +++ b/imgui_basic.py @@ -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'): diff --git a/imgui_edit.lua b/imgui_edit.lua index e0c8bf8..950898a 100644 --- a/imgui_edit.lua +++ b/imgui_edit.lua @@ -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 diff --git a/imgui_edit.py b/imgui_edit.py index 3d0ad63..c284053 100644 --- a/imgui_edit.py +++ b/imgui_edit.py @@ -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 diff --git a/imgui_mouse_capture.lua b/imgui_mouse_capture.lua index d9b9659..97dfb3d 100644 --- a/imgui_mouse_capture.lua +++ b/imgui_mouse_capture.lua @@ -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() diff --git a/imgui_mouse_capture.py b/imgui_mouse_capture.py index cf5485f..acab877 100644 --- a/imgui_mouse_capture.py +++ b/imgui_mouse_capture.py @@ -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() diff --git a/scene_capture_texture.lua b/scene_capture_texture.lua index 208c912..5b52b80 100644 --- a/scene_capture_texture.lua +++ b/scene_capture_texture.lua @@ -66,7 +66,7 @@ while not hg.ReadKeyboard():Key(hg.K_Escape) and hg.IsWindowOpen(win) do -- Take screenshot if CaptureTexture is ready and user pressed space elseif (state == "capture" and frame_count_capture <= frame) then - png_filename = "screenshots/" .. ".png" + png_filename = "capture" .. ".png" hg.SavePNG(picture, png_filename) state = "none" -- Reset state to none to be able to screenshot again end diff --git a/scene_capture_texture.py b/scene_capture_texture.py index f87bb09..0af22c8 100644 --- a/scene_capture_texture.py +++ b/scene_capture_texture.py @@ -72,7 +72,7 @@ # Take screenshot if CaptureTexture is ready and user pressed space elif(state == "capture" and frame_count_capture <= frame): - png_filename = "screenshots/" + ".png" + png_filename = "capture" + ".png" hg.SavePNG(picture, png_filename) state = "none" #Reset state to none to be able to screenshot again