-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Scroll Combo with keyboard / text input #1153
Comments
Hello, I don't understand the quoted bits of code out of context, in particular I don't understand the first bit. Are you trying to do this from within imgui.cpp or from your own code? Please note that those functions are part of bigger library-wise topics like #787 and #456. |
Hi @ocornut my bad I took it for granted that I was patching imgui.cpp code.
and then use the input character a few lines below when drawing the Selectable(s), to scroll to the correct one. P.S. I know there's an ongoing implementation of keyboard navigation, but this seemed to me a nice spot addition to the "regular" navigation, to help scrolling very long combo lists. |
I did not see the implementation of finding an item from the combo by typing text. Is there an implementation of this? |
@Blick1337 no there's nothing like that as far as I know in the ongoing implementation. |
I implemented this in my project, you can take a look at it here if you are interested: https://github.com/HasKha/GWToolboxpp/blob/master/GWToolbox/GWToolbox/ImGuiAddons.cpp Features:
Code is not the cleanest, but works great for me. P.S.: sorry for necro'ing this thread, but I noticed this while updating to 1.53. Maybe someone can find my implementation helpful :) |
No worry! Those threads are open and any useful references/info is good to be posted. Some notes:
|
I'm trying to implement a feature to allow the Combo to scroll when pressing a keyboard key.
In particular, change the active entry to the first one starting with the letter typed in (this is quite useful when you have a long combo list).
I thought I should use the IO.InputCharacters API to consume the first character input by user.
To receive and read the input char I'm using:
within the combo popup code and it does the trick, but it disables the following mouse inputs.
What's the correct way to listen to user input in this case?
Thank you
The text was updated successfully, but these errors were encountered: