-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
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
[ImGui] Some dropdowns failing to open or stay open #2769
Comments
I did a little experimenting with the code, and there's no obvious thing wrong with it like misuse of the widget or something else using the cvar incorrectly. What's interesting is that I occasionally did get it to stay open, but the other times, the arrow stayed highlighted like it knew it was supposed to be open but just wasn't. I'm not sure how up to date our imgui code is, but I don't want to rule out the bug being on them. |
Can you maybe try to remove a few options of this exact drop down menu?
(Like, 1 or 2) Not sure if it has like a hidden limit/cap, of when it stops
displaying it correctly. And I am not sure right now, but I think that this
one has the most options to choose from.
I can also be completely wrong, but this is an idea I had.
|
I found out something new about it, which is, that it DOES work, but only when clicking on the left most part of it. Otherwise, it flickers. |
https://mega.nz/file/ftYy3IDK#atR4SeOclBc_ApFK9idYqeMJJQmypnyJvAMY7jBz3yA Was told to post here and close my other one. It seems, especially with the nested menus, dropdowns on those menus fail to open or stay open when clicked if their submenu is not fully on or off of the game screen. |
it seems the issue name here is quite misleading, i think "tooltips/dropdowns that go outside the main window cause menus to close" or something similar would better describe it edit: i went ahead and changed the name to be the more descriptive one that was closed in favor of this one that is assuming this issue is the same as what i experienced here Screencast.From.2024-12-19.13-01-09.mp4this feels to me like either us misusing imgui or a problem with imgui's docking branch itself. i think good next steps here would be to:
|
The only real way to test if it's a problem with the docker fork would be to have an example done on the main repo. I get the feeling it's just a general ImGui issue. But yes, your video is likely the same issue. |
i still think just bumping the version we use is the best first step though |
tested 1.91.6 with #4738, the issue is still there |
edit: was able to make a minimal repro ocornut/imgui#8252 previous messagei tried to repro in the example app in imgui but wasn't able to - i tried this briaguya@butterfly:~/code/imgui$ git diff
diff --git a/imgui_demo.cpp b/imgui_demo.cpp
index ed205011..d83d3dd8 100644
--- a/imgui_demo.cpp
+++ b/imgui_demo.cpp
@@ -8311,6 +8311,37 @@ static void ShowExampleAppMainMenuBar()
{
if (ImGui::BeginMenu("File"))
{
+ // BEGIN MENU CLOSE ISSUE
+ static int val = 0;
+ ImGui::BeginGroup();
+ ImGui::Dummy(ImVec2(0.0f, 0));
+
+ ImGui::BeginGroup();
+ if (true) {
+ if (ImGui::Button(" - ")) {}
+ ImGui::SameLine();
+ ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
+ }
+
+ auto width = (ImGui::GetContentRegionAvail().x - 30.0f) < 260.0f ? (ImGui::GetContentRegionAvail().x - 30.0f) : 260.0f;
+ ImGui::PushItemWidth(width);
+ if (ImGui::SliderInt("###testslider", &val, 0, 10, "%d", ImGuiSliderFlags_AlwaysClamp)) {}
+ ImGui::PopItemWidth();
+
+ if (true) {
+ ImGui::SameLine();
+ ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
+ if (ImGui::Button(" + ")) {}
+ }
+ ImGui::EndGroup();
+
+ ImGui::Dummy(ImVec2(0.0f, 0));
+ ImGui::EndGroup();
+ if (ImGui::IsItemHovered()) {
+ ImGui::SetTooltip("this is a really long tooltip that will overflow and go outside of the window space and hopefully reproduce the issue i was seeing before");
+ }
+
+ // END MENU CLOSE ISSUE
ShowExampleMenuFile();
ImGui::EndMenu();
}
based on trying to replicate what the uiwidgets in Shipwright/soh/soh/SohMenuBar.cpp Lines 358 to 365 in e7e5b11
are doing |
Whenever I press on the drop down menu for the chest texture, to select an option, it immediately disappears again.
It only happens there for any reason
The text was updated successfully, but these errors were encountered: