[Examples] Fixed cursor hotspot
authorthefiddler <stapostol@gmail.com>
Thu, 1 May 2014 20:17:06 +0000 (22:17 +0200)
committerthefiddler <stapostol@gmail.com>
Thu, 1 May 2014 20:17:06 +0000 (22:17 +0200)
Source/Examples/Data/Textures/cursor.png
Source/Examples/OpenTK/GameWindow/MouseCursorSimple.cs

index 6770629..5c7de62 100644 (file)
Binary files a/Source/Examples/Data/Textures/cursor.png and b/Source/Examples/Data/Textures/cursor.png differ
index 2315d11..9580f98 100644 (file)
@@ -28,12 +28,12 @@ namespace Examples.Tutorial
             using (Bitmap bitmap = new Bitmap("Data/Textures/cursor.png"))
             {
                 var data = bitmap.LockBits(
-                    new Rectangle(2, 21, bitmap.Width, bitmap.Height), 
+                    new Rectangle(0, 0, bitmap.Width, bitmap.Height), 
                     System.Drawing.Imaging.ImageLockMode.ReadOnly, 
                     System.Drawing.Imaging.PixelFormat.Format32bppPArgb);
 
                 MyCursor = new OpenTK.MouseCursor(
-                    0, 0, data.Width, data.Height, data.Scan0);
+                    2, 21, data.Width, data.Height, data.Scan0);
                 Cursor = MyCursor;
             }
 
@@ -73,7 +73,7 @@ namespace Examples.Tutorial
         {
             if (Mouse[MouseButton.Left])
             {
-                AddLine(e.X, i.Y);
+                AddLine(e.X, e.Y);
             }
         }