We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version: 1.76 Branch: master Back-ends: imgui_impl_win32.cpp + imgui_impl_dx9.cpp Compiler: VS2019 Operating System: win10 x64 10.0.18363.752
My Issue/Question:
If a combo widget is followed by a InputText Widget, the popup of the combo widget will NOT show when left mouse button is clicked.
Possible solution:
edit imgui_widgets.cpp, change the code of line 1470, from: bool pressed = ButtonBehavior(frame_bb, id, &hovered, &held); to: bool pressed = ButtonBehavior(frame_bb, id, &hovered, &held, ImGuiButtonFlags_PressedOnClick);
bool pressed = ButtonBehavior(frame_bb, id, &hovered, &held);
bool pressed = ButtonBehavior(frame_bb, id, &hovered, &held, ImGuiButtonFlags_PressedOnClick);
Code to reproduce it:
MSG msg; ZeroMemory(&msg, sizeof(msg)); while (msg.message != WM_QUIT) { if (::PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE)) { ::TranslateMessage(&msg); ::DispatchMessage(&msg); continue; } ImGui_ImplDX9_NewFrame(); ImGui_ImplWin32_NewFrame(); ImGui::NewFrame(); { ImGui::SetNextWindowPos(ImVec2(0, 0)); ImGui::SetNextWindowSize(ImGui::GetIO().DisplaySize); bool windowStatus = true; ImGui::Begin("window title", &windowStatus, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings); ImGuiWindowFlags window_flags = 0; ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 1.0f); ImGui::BeginChild("ChildR", ImVec2(0, 65), true, window_flags); ImGui::Text("Product"); int total_w = ImGui::GetContentRegionAvail().x; ImGui::SameLine(); ImGui::SetNextItemWidth(total_w- 65); static ImGuiComboFlags flags = ImGuiComboFlags_PopupAlignLeft; const char* items[] = { "AAAA", "BBBB", "CCCC", "DDDD", "EEEE", "FFFF", "GGGG", "HHHH", "IIII", "JJJJ", "KKKK", "LLLLLLL", "MMMM", "OOOOOOO" }; static const char* item_current = items[0]; if (ImGui::BeginCombo("", item_current, flags)) { for (int n = 0; n < IM_ARRAYSIZE(items); n++) { bool is_selected = (item_current == items[n]); if (ImGui::Selectable(items[n], is_selected)) item_current = items[n]; if (is_selected) ImGui::SetItemDefaultFocus(); } ImGui::EndCombo(); } ImGui::Text("number "); ImGui::SameLine(); char s[128] = { "KKKTESTTEST" }; ImGui::InputText("", s, _countof(s), ImGuiInputTextFlags_ReadOnly); ImGui::SameLine(); total_w = ImGui::GetContentRegionAvail().x; ImGui::SetNextItemWidth(total_w); if (ImGui::Button("Copy")) { } ImGui::EndChild(); ImGui::PopStyleVar(); ImGui::End(); if (!windowStatus) ::PostQuitMessage(0); }
The text was updated successfully, but these errors were encountered:
Please read the FAQ about the use of label/id and id stack, your code is incorrect as the two widgets use the same id here.
Sorry, something went wrong.
Added io.ConfigDebugHighlightIdConflicts debug feature! (#7961, #7669)
67cd4ea
Also #74, #96, #480, #501, #647, #654, #719, #843, #894, #1057, #1173, #1390, #1414, #1556, #1768, #2041, #2116, #2330, #2475, #2562, #2667, #2807, #2885, #3102, #3375, #3526, #3964, #4008, #4070, #4158, #4172, #4199, #4375, #4395, #4471, #4548, #4612, #4631, #4657, #4796, #5210, #5303, #5360, #5393, #5533, #5692, #5707, #5729, #5773, #5787, #5884, #6046, #6093, #6186, #6223, #6364, #6387, #6567, #6692, #6724, #6939, #6984, #7246, #7270, #7375, #7421, #7434, #7472, #7581, #7724, #7926, #7937 and probably more.. Tagging to increase visibility!
No branches or pull requests
Version: 1.76
Branch: master
Back-ends: imgui_impl_win32.cpp + imgui_impl_dx9.cpp
Compiler: VS2019
Operating System: win10 x64 10.0.18363.752
My Issue/Question:
If a combo widget is followed by a InputText Widget, the popup of the combo widget will NOT show when left mouse button is clicked.
Possible solution:
edit imgui_widgets.cpp, change the code of line 1470,
from:
bool pressed = ButtonBehavior(frame_bb, id, &hovered, &held);
to:
bool pressed = ButtonBehavior(frame_bb, id, &hovered, &held, ImGuiButtonFlags_PressedOnClick);
Code to reproduce it:
The text was updated successfully, but these errors were encountered: