Skip to content

Commit

Permalink
Shadows: remove use of GetWindowContentRegionMax().
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Nov 7, 2024
1 parent 63c1505 commit 1d4c752
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion imgui_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9650,7 +9650,10 @@ static void ShowExampleAppCustomRendering(bool* p_open)
draw_list->Flags &= ~ImDrawListFlags_AntiAliasedFill;

// Fill a strip of background
draw_list->AddRectFilled(ImVec2(ImGui::GetCursorScreenPos().x, ImGui::GetCursorScreenPos().y), ImVec2(ImGui::GetCursorScreenPos().x + ImGui::GetWindowContentRegionMax().x, ImGui::GetCursorScreenPos().y + 200.0f), ImGui::GetColorU32(background_color));
{
ImVec2 p = ImGui::GetCursorScreenPos();
draw_list->AddRectFilled(p, ImVec2(p.x + ImGui::GetContentRegionAvail().x, p.y + 200.0f), ImGui::GetColorU32(background_color));
}

// Rectangle
{
Expand Down

0 comments on commit 1d4c752

Please sign in to comment.