mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
This commit is contained in:
parent
da1864d79e
commit
ee436aa803
4 changed files with 207 additions and 104 deletions
|
|
@ -36,15 +36,6 @@
|
|||
|
||||
-(void)initialize
|
||||
{
|
||||
// Some events do not raise callbacks of AppView in some circumstances (for example when CMD key is held down).
|
||||
// This monitor taps into global event stream and captures these events.
|
||||
NSEventMask eventMask = NSEventMaskKeyDown | NSEventMaskKeyUp | NSEventMaskFlagsChanged;
|
||||
[NSEvent addLocalMonitorForEventsMatchingMask:eventMask handler:^NSEvent * _Nullable(NSEvent *event)
|
||||
{
|
||||
ImGui_ImplOSX_HandleEvent(event, self);
|
||||
return event;
|
||||
}];
|
||||
|
||||
// Setup Dear ImGui context
|
||||
// FIXME: This example doesn't have proper cleanup...
|
||||
IMGUI_CHECKVERSION();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue