Skip to content

Commit

Permalink
Improve show/hide
Browse files Browse the repository at this point in the history
  • Loading branch information
pkdawson committed Jan 17, 2024
1 parent 91df8a7 commit cfd4b49
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions addons/imgui-godot/ImGuiGodot/ImGuiLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,27 +129,23 @@ private void OnChangeVisibility()
if (Visible)
{
ProcessMode = ProcessModeEnum.Always;
// TODO: fix position with multiple monitors
//foreach (Node child in GetChildren())
//{
// if (child is Window w)
// w.Show();
//}
}
else
{
ProcessMode = ProcessModeEnum.Disabled;
Internal.State.Instance.Renderer.OnHide();
_subViewportSize = Vector2I.Zero;
RenderingServer.CanvasItemClear(_ci);
//foreach (Node child in GetChildren())
//{
// if (child is Window w)
// w.Hide();
//}
CallDeferred(MethodName.FinishHide);
}
}

private static void FinishHide()
{
ImGui.NewFrame();
ImGuiGD.Render();
}

public override void _Process(double delta)
{
var winSize = _window.Size;
Expand Down

0 comments on commit cfd4b49

Please sign in to comment.