Problem with 'io.KeysData'
cos1110 opened this issue · 2 comments
cos1110 commented
For me this line crashes because there is an 'index out of range exception'.
foreach (var keyItr in RaylibKeyMap)
io.KeysData[(int)keyItr.Value].Down = (byte)(Raylib.IsKeyDown(keyItr.Key) ? 1 : 0);
I figured that this is offset value is needed. It worked for me fine, text input is OK.
https://github.com/ocornut/imgui/blob/e265610a0c4143b9abc64c50a3950ddcd0243622/imgui.h#L1425
foreach (var keyItr in RaylibKeyMap)
io.KeysData[(int)(keyItr.Value - ImGuiKey.KeysData_OFFSET)].Down = (byte)(Raylib.IsKeyDown(keyItr.Key) ? 1 : 0);
JeffM2501 commented
That code is not needed and a holdover from the previous key input system. It has been removed.
cos1110 commented
OK, it looks like you updated it. Thanks.