mirror of https://github.com/AxioDL/boo.git
Added cocoa cursor methods
This commit is contained in:
parent
66c2cbdf14
commit
41256d2673
|
@ -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(),
|
||||
|
|
Loading…
Reference in New Issue