mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Added GetKeyIndex() helper.
This commit is contained in:
5
imgui.h
5
imgui.h
@ -371,8 +371,9 @@ namespace ImGui
|
||||
IMGUI_API void ColorConvertHSVtoRGB(float h, float s, float v, float& out_r, float& out_g, float& out_b);
|
||||
|
||||
// Inputs
|
||||
IMGUI_API bool IsKeyDown(int key_index); // key_index into the keys_down[512] array, imgui doesn't know the semantic of each entry, uses your own indices!
|
||||
IMGUI_API bool IsKeyPressed(int key_index, bool repeat = true); // if repeat=true. uses io.KeyRepeatDelay / KeyRepeatRate
|
||||
IMGUI_API int GetKeyIndex(ImGuiKey key); // map ImGuiKey_* values into user's key index. == io.KeyMap[key]
|
||||
IMGUI_API bool IsKeyDown(int key_index); // key_index into the keys_down[] array, imgui doesn't know the semantic of each entry, uses your own indices!
|
||||
IMGUI_API bool IsKeyPressed(int key_index, bool repeat = true); // uses user's key indices as stored in the keys_down[] array. if repeat=true. uses io.KeyRepeatDelay / KeyRepeatRate
|
||||
IMGUI_API bool IsKeyReleased(int key_index); // "
|
||||
IMGUI_API bool IsMouseDown(int button); // is mouse button held
|
||||
IMGUI_API bool IsMouseClicked(int button, bool repeat = false); // did mouse button clicked (went from !Down to Down)
|
||||
|
Reference in New Issue
Block a user