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
My Issue/Question:
In short, I'm looking to emulate something like this menu:
so if a user right-clicks in any text (or numeric) input, they can select copy, or paste, etc and it'll do exactly the same as the ctrl+c/etc shortcuts which are already working
If you need a menu - you must implement a menu. If you are looking for some kind of uniform behavior it is best to make a widget wrapper function which calls said widget and implements menu you need.
If we provide a default menu (opt in or opt out?) people will want to extend it with their own stuff.
The problem is, I am not sure it is possible to implement that menu easily from user side, as those actions needs to be performed from within InputText().
Also linking to #1844 which is a different issue but relate to same thing. Specifically for #1844 we would need to be able to forward specific events (such as copy/paste, undo) from an external source to have them processed by the InputText(). If we can make that happen, then creating that menu in user-land is possible, and likely it would become possible to provide that stock menu (with an opt-in flag) as well as a function to emit the menu as part of a user custom menu.
Version/Branch of Dear ImGui:
Version: 1.84.2
My Issue/Question:
In short, I'm looking to emulate something like this menu:
so if a user right-clicks in any text (or numeric) input, they can select copy, or paste, etc and it'll do exactly the same as the ctrl+c/etc shortcuts which are already working
I can do this along these lines
https://github.com/ocornut/imgui/blob/v1.85/imgui_demo.cpp#L3261-L3279
however that seems to involve calling BeginPopupContextItem after every text-input which is a bit infeasible
I'm certain this has been asked before, but after a bunch of searching I couldn't find anything
Thanks!
The text was updated successfully, but these errors were encountered: