diff --git a/lib/mac/WindowCocoa.mm b/lib/mac/WindowCocoa.mm index e4e67fc..5174565 100644 --- a/lib/mac/WindowCocoa.mm +++ b/lib/mac/WindowCocoa.mm @@ -955,6 +955,7 @@ class WindowCocoa : public IWindow WindowCocoaInternal* m_nsWindow; IGraphicsContext* m_gfxCtx; + EMouseCursor m_cursor = EMouseCursor::None; public: @@ -1020,6 +1021,31 @@ public: }); } + void setCursor(EMouseCursor cursor) + { + if (cursor == m_cursor) + return; + m_cursor = cursor; + dispatch_async(dispatch_get_main_queue(), + ^{ + switch (cursor) + { + case EMouseCursor::Pointer: + [[NSCursor arrowCursor] set]; + break; + case EMouseCursor::HorizontalArrow: + [[NSCursor resizeLeftRightCursor] set]; + break; + case EMouseCursor::VerticalArrow: + [[NSCursor resizeUpDownCursor] set]; + break; + default: break; + } + }); + } + + void setWaitCursor(bool wait) {} + void setWindowFrameDefault() { dispatch_sync(dispatch_get_main_queue(),