Aidan63 / linc_imgui

Haxe/hxcpp @:native bindings for Dear ImGui
MIT License
44 stars 7 forks source link

[Kha] Enter or Backspace doesn't seem to work for text input #8

Closed Jarrio closed 6 years ago

Jarrio commented 6 years ago

gif

I am using the example template which has the following lines

io.keysDown[KeyCode.Return   ] = isKeyDown[KeyCode.Return];
io.keysDown[KeyCode.Backspace] = isKeyDown[KeyCode.Backspace];

An odd thing I noticed when configuring the flags for component inputText setting the flags to:

var flags = ImGuiInputTextFlags.EnterReturnsTrue;
flags |= ImGuiInputTextFlags.CharsUppercase;

Backspace would register as Return but Return never gets picked up

Aidan63 commented 6 years ago

I've not been able to recreate this issue so far. I've tested on linux and the backspace works as expected and return causes inputText to return true when the flag is set. Judging from the gif it seems like you're on windows so I'll try to give it a try later today.

Jarrio commented 6 years ago

To confirm, I am on Windows!

Much appreciated.

Jarrio commented 6 years ago

I found the cause!

It appears like the issue is actually with the version of ImGui this repo links to (I --recursively cloned the repo), I updated to the newest ImGui and everything seems to be working now.

Aidan63 commented 6 years ago

Nice, just saw that ImGui 1.61 was released a few days ago so I'll try and updating the externs and hopefully that will fix it for everyone.