You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to implement an interactable tooltip/popup containing clickable suggestions on top of InputText(). I want the popup to appear over the window that contains the InputText() without taking keyboard focus from the text field (think code completion). Navigation using arrows and Tab/Enter would be a nice cherry on top (unfortunately, CallbackHistory and multiline input don't go well together :<).
The specific use case for me is that I have several dynamically created input fields (both single and multiline), where the user can put any
text, but there are some special values that will get translated later. If the user writes something that is a prefix of at least one of those special values, I want the popup with possible matches to appear under the field without taking the focus from said field (so the user can continue writing, if they decide to do so).
My current solution is based on your comment, which looks nice, but you cannot interact with it.
I tried other solutions from the same thread and I had the best looking results with solution posted by @rokups. It worked as intended but only for single field forms due to static bool isOpen variable - I couldn't figure out how to get rid of it. The second issue I noticed is that when I tried to open the whole form inside a modal popup, the hint popup stopped being interactable - my guess is that modal blocks all interaction with other windows and the hint popup, even as it is on top of the modal, is treated as separate window.
The question is: how can I implement a solution that will work in the scenario described above? Is it possible at all, using public API, or is it something that is yet to come?
Version/Branch of Dear ImGui:
Version: 1.83
Branch: docking
My Issue/Question:
Hi!
I need to implement an interactable tooltip/popup containing clickable suggestions on top of
InputText()
. I want the popup to appear over the window that contains theInputText()
without taking keyboard focus from the text field (think code completion). Navigation using arrows and Tab/Enter would be a nice cherry on top (unfortunately, CallbackHistory and multiline input don't go well together :<).The specific use case for me is that I have several dynamically created input fields (both single and multiline), where the user can put any
text, but there are some special values that will get translated later. If the user writes something that is a prefix of at least one of those special values, I want the popup with possible matches to appear under the field without taking the focus from said field (so the user can continue writing, if they decide to do so).
My current solution is based on your comment, which looks nice, but you cannot interact with it.
I tried other solutions from the same thread and I had the best looking results with solution posted by @rokups. It worked as intended but only for single field forms due to
static bool isOpen
variable - I couldn't figure out how to get rid of it. The second issue I noticed is that when I tried to open the whole form inside a modal popup, the hint popup stopped being interactable - my guess is that modal blocks all interaction with other windows and the hint popup, even as it is on top of the modal, is treated as separate window.The question is: how can I implement a solution that will work in the scenario described above? Is it possible at all, using public API, or is it something that is yet to come?
Current solution preview:
The text was updated successfully, but these errors were encountered: