Skip to content

Commit

Permalink
Revert "Update ImGui window positions on every resize (CleverRaven#72353
Browse files Browse the repository at this point in the history
)"

This reverts commit 16e2dce.
  • Loading branch information
SurFlurer committed Mar 19, 2024
1 parent 772a404 commit 0221e74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cata_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ void cataimgui::window::draw()
if( cached_bounds.y != -1.f ) {
center.y = cached_bounds.y;
}
ImGui::SetNextWindowPos( center, ImGuiCond_Always, { cached_bounds.x == -1.f ? 0.5f : 0.f, cached_bounds.y == -1.f ? 0.5f : 0.f } );
ImGui::SetNextWindowPos( center, ImGuiCond_Appearing, { cached_bounds.x == -1.f ? 0.5f : 0.f, cached_bounds.y == -1.f ? 0.5f : 0.f } );
} else if( cached_bounds.x >= 0 && cached_bounds.y >= 0 ) {
ImGui::SetNextWindowPos( { cached_bounds.x, cached_bounds.y } );
}
Expand Down

0 comments on commit 0221e74

Please sign in to comment.