Shadows: remove use of GetWindowContentRegionMax().

This commit is contained in:
ocornut 2024-07-30 18:01:33 +02:00
parent 820cf24574
commit dac32cb6a0
1 changed files with 4 additions and 1 deletions

View File

@ -9597,7 +9597,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
{