Backends: OSX: Fix keyboard support. Handle scroll cancel. Don't set mouse cursor shape unconditionally. (#4759, #4253, #1873)

Note the original FIXME: refered to GLFWs Cocoa implementation, which is largely what this commit provides.
This commit is contained in:
Stuart Carnie
2021-12-11 09:20:17 +11:00
committed by ocornut
parent f71ee5203e
commit 1b6b8602c1
5 changed files with 213 additions and 102 deletions

View File

@ -58,7 +58,7 @@
//ImGui::StyleColorsClassic();
// Setup Platform/Renderer backends
ImGui_ImplOSX_Init();
ImGui_ImplOSX_Init(self);
ImGui_ImplOpenGL2_Init();
// Load Fonts
@ -149,9 +149,6 @@
-(void)reshape { [[self openGLContext] update]; [self updateAndDrawDemoView]; }
-(void)drawRect:(NSRect)bounds { [self updateAndDrawDemoView]; }
-(void)animationTimerFired:(NSTimer*)timer { [self setNeedsDisplay:YES]; }
-(BOOL)acceptsFirstResponder { return (YES); }
-(BOOL)becomeFirstResponder { return (YES); }
-(BOOL)resignFirstResponder { return (YES); }
-(void)dealloc { animationTimer = nil; }
//-----------------------------------------------------------------------------------