]> git.mxchange.org Git - flightgear.git/commitdiff
add support for resizing mouse cursors
authormfranz <mfranz>
Sun, 11 Jan 2009 15:01:05 +0000 (15:01 +0000)
committerTim Moore <timoore@redhat.com>
Mon, 12 Jan 2009 12:04:33 +0000 (13:04 +0100)
(except on OSX, where OSG uses a default)

src/Main/fg_os.hxx
src/Main/fg_os_osgviewer.cxx

index 86710b680621e8d1a2d93ea664c71504cefa5842..62f6f8f7ddc89029b73432fa4af5733f4c47896e 100644 (file)
@@ -24,7 +24,16 @@ enum { MOUSE_CURSOR_NONE,
        MOUSE_CURSOR_POINTER,
        MOUSE_CURSOR_WAIT,
        MOUSE_CURSOR_CROSSHAIR,
-       MOUSE_CURSOR_LEFTRIGHT };
+       MOUSE_CURSOR_LEFTRIGHT,
+       MOUSE_CURSOR_TOPSIDE,
+       MOUSE_CURSOR_BOTTOMSIDE,
+       MOUSE_CURSOR_LEFTSIDE,
+       MOUSE_CURSOR_RIGHTSIDE,
+       MOUSE_CURSOR_TOPLEFT,
+       MOUSE_CURSOR_TOPRIGHT,
+       MOUSE_CURSOR_BOTTOMLEFT,
+       MOUSE_CURSOR_BOTTOMRIGHT,
+};
 
 enum { KEYMOD_NONE     = 0,
        KEYMOD_RELEASED = 1, // Not a mod key, indicates "up" action
index af92bc82f58f46b647ac924672a4f5830ecdc0f2..8badbd6d1418c00b329cd8b2fb14405134dabb3d 100644 (file)
@@ -227,6 +227,22 @@ static void setMouseCursor(osg::Camera* camera, int cursor)
         mouseCursor = osgViewer::GraphicsWindow::CrosshairCursor;
     else if(cursor == MOUSE_CURSOR_LEFTRIGHT)
         mouseCursor = osgViewer::GraphicsWindow::LeftRightCursor;
+    else if(cursor == MOUSE_CURSOR_TOPSIDE)
+        mouseCursor = osgViewer::GraphicsWindow::TopSideCursor;
+    else if(cursor == MOUSE_CURSOR_BOTTOMSIDE)
+        mouseCursor = osgViewer::GraphicsWindow::BottomSideCursor;
+    else if(cursor == MOUSE_CURSOR_LEFTSIDE)
+        mouseCursor = osgViewer::GraphicsWindow::LeftSideCursor;
+    else if(cursor == MOUSE_CURSOR_RIGHTSIDE)
+        mouseCursor = osgViewer::GraphicsWindow::RightSideCursor;
+    else if(cursor == MOUSE_CURSOR_TOPLEFT)
+        mouseCursor = osgViewer::GraphicsWindow::TopLeftCorner;
+    else if(cursor == MOUSE_CURSOR_TOPRIGHT)
+        mouseCursor = osgViewer::GraphicsWindow::TopRightCorner;
+    else if(cursor == MOUSE_CURSOR_BOTTOMLEFT)
+        mouseCursor = osgViewer::GraphicsWindow::BottomLeftCorner;
+    else if(cursor == MOUSE_CURSOR_BOTTOMRIGHT)
+        mouseCursor = osgViewer::GraphicsWindow::BottomRightCorner;
 
     gw->setCursor(mouseCursor);
 }