mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
This commit is contained in:
10
imgui.cpp
10
imgui.cpp
@ -390,6 +390,7 @@ CODE
|
||||
- IsKeyPressed(MY_NATIVE_KEY_XXX) -> use IsKeyPressed(ImGuiKey_XXX)
|
||||
- IsKeyPressed(GetKeyIndex(ImGuiKey_XXX)) -> use IsKeyPressed(ImGuiKey_XXX)
|
||||
- Backend writing to io.KeyMap[],io.KeysDown[] -> backend should call io.AddKeyEvent()
|
||||
- inputs: added io.AddKeyModEvent() instead of writing directly to io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper.
|
||||
- 2022/01/05 (1.87) - inputs: renamed ImGuiKey_KeyPadEnter to ImGuiKey_KeypadEnter to align with new symbols. Kept redirection enum.
|
||||
- 2022/01/05 (1.87) - removed io.ImeSetInputScreenPosFn() in favor of more flexible io.SetPlatformImeDataFn(). Removed 'void* io.ImeWindowHandle' in favor of writing to 'void* ImGuiViewport::PlatformHandleRaw'.
|
||||
- 2022/01/01 (1.87) - commented out redirecting functions/enums names that were marked obsolete in 1.69, 1.70, 1.71, 1.72 (March-July 2019)
|
||||
@ -1281,6 +1282,15 @@ void ImGuiIO::SetKeyEventNativeData(ImGuiKey key, int native_keycode, int native
|
||||
#endif
|
||||
}
|
||||
|
||||
void ImGuiIO::AddKeyModEvent(ImGuiKeyModFlags modifiers)
|
||||
{
|
||||
KeyMods = modifiers;
|
||||
KeyCtrl = (modifiers & ImGuiKeyModFlags_Ctrl) != 0;
|
||||
KeyShift = (modifiers & ImGuiKeyModFlags_Shift) != 0;
|
||||
KeyAlt = (modifiers & ImGuiKeyModFlags_Alt) != 0;
|
||||
KeySuper = (modifiers & ImGuiKeyModFlags_Super) != 0;
|
||||
}
|
||||
|
||||
void ImGuiIO::AddFocusEvent(bool focused)
|
||||
{
|
||||
// We intentionally overwrite this and process in NewFrame(), in order to give a chance
|
||||
|
Reference in New Issue
Block a user