Renamed OpenPopupOnItemClick() to OpenPopupContextItem(). Kept inline redirection function (will obsolete). + Removed CalcItemRectClosestPoint() entry point

This commit is contained in:
ocornut
2020-06-15 22:06:45 +02:00
parent c658cba22b
commit 99ab521024
6 changed files with 16 additions and 12 deletions

View File

@ -2829,11 +2829,11 @@ static void ShowDemoWindowPopups()
ImGui::EndPopup();
}
// We can also use OpenPopupOnItemClick() which is the same as BeginPopupContextItem() but without the
// We can also use OpenPopupContextItem() which is the same as BeginPopupContextItem() but without the
// Begin() call. So here we will make it that clicking on the text field with the right mouse button (1)
// will toggle the visibility of the popup above.
ImGui::Text("(You can also right-click me to open the same popup as above.)");
ImGui::OpenPopupOnItemClick("item context menu", 1);
ImGui::OpenPopupContextItem("item context menu", 1);
// When used after an item that has an ID (e.g.Button), we can skip providing an ID to BeginPopupContextItem().
// BeginPopupContextItem() will use the last item ID as the popup ID.