mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-23 23:31:08 +01:00
Backends: OSX: Forward keyDown/keyUp events to OS when unused by Dear ImGui.
This commit is contained in:
parent
c6cab1f352
commit
2554b512c0
@ -23,6 +23,7 @@
|
||||
|
||||
// CHANGELOG
|
||||
// (minor and older changes stripped away, please see git history for details)
|
||||
// 2022-02-07: Inputs: Forward keyDown/keyUp events to OS when unused by dear imgui.
|
||||
// 2022-01-31: Fix building with old Xcode versions that are missing gamepad features.
|
||||
// 2022-01-26: Inputs: replaced short-lived io.AddKeyModsEvent() (added two weeks ago)with io.AddKeyEvent() using ImGuiKey_ModXXX flags. Sorry for the confusion.
|
||||
// 2021-01-20: Inputs: calling new io.AddKeyAnalogEvent() for gamepad support, instead of writing directly to io.NavInputs[].
|
||||
@ -131,7 +132,8 @@ static double GetMachAbsoluteTimeInSeconds()
|
||||
|
||||
- (void)keyDown:(NSEvent*)event
|
||||
{
|
||||
ImGui_ImplOSX_HandleEvent(event, self);
|
||||
if (!ImGui_ImplOSX_HandleEvent(event, self))
|
||||
[super keyDown:event];
|
||||
|
||||
// Call to the macOS input manager system.
|
||||
[self interpretKeyEvents:@[event]];
|
||||
@ -139,7 +141,8 @@ static double GetMachAbsoluteTimeInSeconds()
|
||||
|
||||
- (void)keyUp:(NSEvent*)event
|
||||
{
|
||||
ImGui_ImplOSX_HandleEvent(event, self);
|
||||
if (!ImGui_ImplOSX_HandleEvent(event, self))
|
||||
[super keyUp:event];
|
||||
}
|
||||
|
||||
- (void)insertText:(id)aString replacementRange:(NSRange)replacementRange
|
||||
|
@ -153,6 +153,7 @@ Other Changes:
|
||||
- Backends: OSX: Added basic Platform IME support. (#3108, #2598) [@liuliu]
|
||||
- Backends: OSX: Fix Game Controller nav mapping to use shoulder for both focusing and tweak speed. (#4759)
|
||||
- Backends: OSX: Fix building with old Xcode versions that are missing gamepad features. [@rokups]
|
||||
- Backends: OSX: Forward keyDown/keyUp events to OS when unused by Dear ImGui.
|
||||
- Backends: Android, GLUT: Submit keys using io.AddKeyEvent(). Submit keymods using io.AddKeyModsEvent() at the same time. (#2625)
|
||||
- Backends: Android, GLUT: Submit mouse data using io.AddMousePosEvent(), AddMouseButtonEvent(), AddMouseWheelEvent() functions. (#4858)
|
||||
- Backends: OpenGL3: Fixed a buffer overflow in imgui_impl_opengl3_loader.h init (added in 1.86). (#4468, #4830) [@dymk]
|
||||
|
Loading…
Reference in New Issue
Block a user