Demo: fixed ID conflicts. (#8723)
This commit is contained in:
+4
-4
@@ -4444,11 +4444,11 @@ static void DemoWindowLayout()
|
|||||||
|
|
||||||
ImGui::Text("SetNextItemWidth/PushItemWidth(-Min(GetContentRegionAvail().x * 0.40f, GetFontSize() * 12))");
|
ImGui::Text("SetNextItemWidth/PushItemWidth(-Min(GetContentRegionAvail().x * 0.40f, GetFontSize() * 12))");
|
||||||
ImGui::PushItemWidth(-IM_MIN(ImGui::GetFontSize() * 12, ImGui::GetContentRegionAvail().x * 0.40f));
|
ImGui::PushItemWidth(-IM_MIN(ImGui::GetFontSize() * 12, ImGui::GetContentRegionAvail().x * 0.40f));
|
||||||
ImGui::DragFloat("float##4a", &f);
|
ImGui::DragFloat("float##5a", &f);
|
||||||
if (show_indented_items)
|
if (show_indented_items)
|
||||||
{
|
{
|
||||||
ImGui::Indent();
|
ImGui::Indent();
|
||||||
ImGui::DragFloat("float (indented)##4b", &f);
|
ImGui::DragFloat("float (indented)##5b", &f);
|
||||||
ImGui::Unindent();
|
ImGui::Unindent();
|
||||||
}
|
}
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
@@ -4458,11 +4458,11 @@ static void DemoWindowLayout()
|
|||||||
ImGui::Text("SetNextItemWidth/PushItemWidth(-FLT_MIN)");
|
ImGui::Text("SetNextItemWidth/PushItemWidth(-FLT_MIN)");
|
||||||
ImGui::SameLine(); HelpMarker("Align to right edge");
|
ImGui::SameLine(); HelpMarker("Align to right edge");
|
||||||
ImGui::PushItemWidth(-FLT_MIN);
|
ImGui::PushItemWidth(-FLT_MIN);
|
||||||
ImGui::DragFloat("##float5a", &f);
|
ImGui::DragFloat("##float6a", &f);
|
||||||
if (show_indented_items)
|
if (show_indented_items)
|
||||||
{
|
{
|
||||||
ImGui::Indent();
|
ImGui::Indent();
|
||||||
ImGui::DragFloat("float (indented)##5b", &f);
|
ImGui::DragFloat("float (indented)##6b", &f);
|
||||||
ImGui::Unindent();
|
ImGui::Unindent();
|
||||||
}
|
}
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
|
|||||||
Reference in New Issue
Block a user