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

imgui inputText/float/int duplicated characters #1898

Open
2 tasks done
XDinEuro opened this issue Jan 10, 2025 · 5 comments
Open
2 tasks done

imgui inputText/float/int duplicated characters #1898

XDinEuro opened this issue Jan 10, 2025 · 5 comments
Labels
type: bug Indicates an unexpected problem or unintended behavior

Comments

@XDinEuro
Copy link

Taking a build in example, point_cloud
Screenshot from 2025-01-10 15-00-57

If I focus on the text input, and type 1, it will appear 11 in input box, same as all characters (except backspace).

I checked the origin imgui project, it looks fine in its example.

I wonder if we used it in a wrong way ?

Bug Report

Please answer the following questions for yourself before reporting a bug.

  • I checked the documentation and the forum but found no answer.
  • I checked to make sure that this issue has not already been filed.

Environment

Select the following information.

  • DART version: 6.14.4
  • OS name and version name(or number): ubuntu22.04
  • Compiler name and version number: gcc 11.4

Expected Behavior

The input box shows exactly what I typed.

Current Behavior

The input characters are duplicated.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. build the project and examples
  2. open point_cloud
  3. focus on the input box by single click on it
  4. type a number, like '1'

Code to Reproduce

@XDinEuro XDinEuro added the type: bug Indicates an unexpected problem or unintended behavior label Jan 10, 2025
@jslee02
Copy link
Member

jslee02 commented Jan 11, 2025

I was able to reproduce the issue with version 6.14.4, but it appears to be resolved in 6.15.0. This might be related to the changes in https://github.com/dartsim/dart/pull/1872/files. Could you try updating to 6.15.0?

@XDinEuro
Copy link
Author

Thanks for the reply. I did the update and the behavior remains the same.

@jslee02
Copy link
Member

jslee02 commented Jan 14, 2025

Could you retry the build with -DDART_USE_SYSTEM_IMGUI=ON in CMake? The vendored imgui is a bit outdated. You may need to install the imgui package using a package manager of your choice.

@XDinEuro
Copy link
Author

XDinEuro commented Jan 15, 2025

hey, I managed it by dong this: replace the imgui source files with up to date files from https://github.com/ocornut/imgui/, and keep the changes marked with MODIFIED FOR DART in https://github.com/dartsim/dart/blob/main/dart/external/imgui/imgui_impl_opengl2.cpp#L120 and resolve some compile errors. Eventually I made it with some effort.

Does it make sense to update the imgui source files to latest version in dart ?

@jslee02
Copy link
Member

jslee02 commented Jan 20, 2025

I'm glad to hear you found a workaround! Eventually, I plan to remove the IMGUI source from this repository. Originally, it was included because (1) IMGUI wasn’t available through package managers, and (2) modifications marked as "MODIFIED_FOR_DART" were necessary. However, these reasons no longer seem to apply.

To support this transition, I’ve added the DART_USE_SYSTEM_IMGUI option, allowing for an external IMGUI installation as a long-term solution.

Updating the IMGUI source in this repository is fine. Feel free to submit a PR for the update, but I would recommend using the DART_USE_SYSTEM_IMGUI option instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants