[Examples] Fixed cursor hotspot

This commit is contained in:
thefiddler 2014-05-01 22:17:06 +02:00
parent 9bd94c1f13
commit 60f58c2ffd
2 changed files with 3 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 925 B

After

Width:  |  Height:  |  Size: 755 B

View file

@ -28,12 +28,12 @@ namespace Examples.Tutorial
using (Bitmap bitmap = new Bitmap("Data/Textures/cursor.png")) using (Bitmap bitmap = new Bitmap("Data/Textures/cursor.png"))
{ {
var data = bitmap.LockBits( 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.ImageLockMode.ReadOnly,
System.Drawing.Imaging.PixelFormat.Format32bppPArgb); System.Drawing.Imaging.PixelFormat.Format32bppPArgb);
MyCursor = new OpenTK.MouseCursor( MyCursor = new OpenTK.MouseCursor(
0, 0, data.Width, data.Height, data.Scan0); 2, 21, data.Width, data.Height, data.Scan0);
Cursor = MyCursor; Cursor = MyCursor;
} }
@ -73,7 +73,7 @@ namespace Examples.Tutorial
{ {
if (Mouse[MouseButton.Left]) if (Mouse[MouseButton.Left])
{ {
AddLine(e.X, i.Y); AddLine(e.X, e.Y);
} }
} }