Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

benmkw
Copy link
Contributor

@benmkw benmkw commented Dec 29, 2020

I am not sure if someone needs to call key_index so maybe this should still remain pub but I could not see an obvious reason (and also not specific reason for the casts but don't have a strong opinion about it either).

closes #415

@thomcc thomcc merged commit 7fce85f into imgui-rs:master Dec 31, 2020
@norcalli
Copy link

This entire MR is incorrect. For one, the keys_down array is 512 long, whereas the key_map is only 22 long. Forcing the key_conversion index means you can't actually use any of the key_down parts of the code anymore.

@thomcc
Copy link
Member

thomcc commented Feb 14, 2021

I think it's fair to state that this probably inadvertently harmed some use cases (use cases involing keys that imgui doesn't use). You should still be able to access it via io, e.g. ui.io().key_map[N].

That said, it's probably worth adding back functions to call the ImGUI functions without going through the key map.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI::is_key_released may be easy to use incorrectly because of u32 key_index
3 participants