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 am currently trying to respond to the "Enter" key in an input box. However, the combination of if g.IsKeyPressed(g.KeyEnter) && g.IsItemActive() does not work.
Enter makes the focus disappear from the item (which is ok) but at that moment the IF condition no longer applies. If I omit isItemActive all enter keys are taken into account, which I don't want.
@schabil I'd suggest you to try with (*InputTextMultilineWidget).Callback(...) well it doesn't work
btw @AllenDang IMO imgui.InputTextCallbackData needs some API in giu
What happend?
Hey,
thanks a lot for your great work.
I am currently trying to respond to the "Enter" key in an input box. However, the combination of if g.IsKeyPressed(g.KeyEnter) && g.IsItemActive() does not work.
Enter makes the focus disappear from the item (which is ok) but at that moment the IF condition no longer applies. If I omit isItemActive all enter keys are taken into account, which I don't want.
Code example
main.go
g.InputText(&doc_tags_test).AutoComplete(liste_tags),
g.Custom(func() {
if g.IsKeyPressed(g.KeyEnter) && g.IsItemActive() {
fmt.Println("Enter")
}
}),
To Reproduce
Version
v0.6.1
OS
Linux Manjaro
The text was updated successfully, but these errors were encountered: