Skip to content
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

TabItem requires two clicks to select #6318

Closed
ZhouMin216 opened this issue Apr 11, 2023 · 3 comments
Closed

TabItem requires two clicks to select #6318

ZhouMin216 opened this issue Apr 11, 2023 · 3 comments

Comments

@ZhouMin216
Copy link

Version/Branch of Dear ImGui:

Version: 1.89.3 WIP
Branch: master

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_android.h imgui_impl_opengl3.h
Operating System: Android

My Issue/Question:

Hi all,
When I use BeginTabItem on the Windows system, it is selected by clicking once. When using it on the Android system, I must click twice, or first click on another location, and then click TabItem to be selected. It seems that there are no different behaviors set for different systems in the source code. What do I need to do to select TabItem with just one click on the Android platform?
Thanks for any help.

Video:
https://user-images.githubusercontent.com/47287700/231030790-1a42001f-ef08-4f2c-9f69-2d92f749844e.mp4

          if (ImGui::BeginTabBar("MyTabBar", tab_bar_flags))
          {
              for (int n = 0; n < IM_ARRAYSIZE(opened); n++)
                  if (opened[n] && ImGui::BeginTabItem(names[n], &opened[n], ImGuiTabItemFlags_None))
                  {
                      ImGui::Text("This is the %s tab!", names[n]);
                      if (n & 1)
                          ImGui::Text("I am an odd tab.");
                      ImGui::EndTabItem();
                  }
              ImGui::EndTabBar();
          }
@ocornut
Copy link
Owner

ocornut commented Apr 11, 2023

Hello,
Coincidentally, even thought this has been a problem with touch device for years this was JUST fixed with c9fe7eb + for Android db4c4e3. If you update to latest master it should work.

@ZhouMin216
Copy link
Author

Hello, Coincidentally, even thought this has been a problem with touch device for years this was JUST fixed with c9fe7eb + for Android db4c4e3. If you update to latest master it should work.
Thank you for your reply! I'll give it a try

@ZhouMin216
Copy link
Author

@ocornut I have updated to the latest master and this issue has been well resolved. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants