New cursor shapes.
Unfortunately OSG lacks the 'closed hand' (aka 'grab') cursor, really time to get platform cursor working reliably.
This commit is contained in:
parent
0971ed1f2c
commit
ead479532b
3 changed files with 12 additions and 3 deletions
|
@ -45,9 +45,11 @@ NSCursor* cocoaCursorForKey(FGMouseCursor::Cursor aKey)
|
|||
case FGMouseCursor::CURSOR_HAND: return [NSCursor pointingHandCursor];
|
||||
case FGMouseCursor::CURSOR_CROSSHAIR: return [NSCursor crosshairCursor];
|
||||
case FGMouseCursor::CURSOR_IBEAM: return [NSCursor IBeamCursor];
|
||||
|
||||
case FGMouseCursor::CURSOR_CLOSED_HAND: return [NSCursor closedHandCursor];
|
||||
|
||||
// FIXME - use a proper left-right cursor here.
|
||||
case FGMouseCursor::CURSOR_LEFT_RIGHT: return [NSCursor resizeLeftRightCursor];
|
||||
case FGMouseCursor::CURSOR_UP_DOWN: return [NSCursor resizeUpDownCursor];
|
||||
|
||||
case FGMouseCursor::CURSOR_SPIN_CW:
|
||||
path = [path stringByAppendingPathComponent:@"cursor-spin-cw.png"];
|
||||
|
|
|
@ -105,10 +105,11 @@ private:
|
|||
switch (aCursor) {
|
||||
case CURSOR_ARROW: return osgViewer::GraphicsWindow::RightArrowCursor;
|
||||
case CURSOR_HAND: return osgViewer::GraphicsWindow::HandCursor;
|
||||
case CURSOR_CLOSED_HAND: return osgViewer::GraphicsWindow::HandCursor;
|
||||
case CURSOR_CROSSHAIR: return osgViewer::GraphicsWindow::CrosshairCursor;
|
||||
case CURSOR_IBEAM: return osgViewer::GraphicsWindow::TextCursor;
|
||||
case CURSOR_LEFT_RIGHT: return osgViewer::GraphicsWindow::LeftRightCursor;
|
||||
|
||||
case CURSOR_UP_DOWN: return osgViewer::GraphicsWindow::UpDownCursor;
|
||||
default:
|
||||
return osgViewer::GraphicsWindow::RightArrowCursor;
|
||||
}
|
||||
|
@ -223,7 +224,12 @@ const MouseCursorMap mouse_cursor_map[] = {
|
|||
{ "crosshair", FGMouseCursor::CURSOR_CROSSHAIR },
|
||||
{ "left-right", FGMouseCursor::CURSOR_LEFT_RIGHT },
|
||||
{ "hand", FGMouseCursor::CURSOR_HAND },
|
||||
{ "closed-hand", FGMouseCursor::CURSOR_CLOSED_HAND },
|
||||
{ "text", FGMouseCursor::CURSOR_IBEAM },
|
||||
|
||||
// aliases
|
||||
{ "drag-horizontal", FGMouseCursor::CURSOR_LEFT_RIGHT },
|
||||
{ "drag-vertical", FGMouseCursor::CURSOR_UP_DOWN },
|
||||
{ 0, FGMouseCursor::CURSOR_ARROW }
|
||||
};
|
||||
|
||||
|
|
|
@ -33,7 +33,8 @@ public:
|
|||
enum Cursor
|
||||
{
|
||||
CURSOR_ARROW,
|
||||
CURSOR_HAND,
|
||||
CURSOR_HAND, ///< the browser 'link' cursor
|
||||
CURSOR_CLOSED_HAND,
|
||||
CURSOR_CROSSHAIR,
|
||||
CURSOR_IBEAM, ///< for editing text
|
||||
CURSOR_IN_OUT, ///< arrow pointing into / out of the screen
|
||||
|
|
Loading…
Add table
Reference in a new issue