Permalink
Browse files

[Examples] Fixed cursor hotspot

  • Loading branch information...
1 parent 9bd94c1 commit 60f58c2ffdd2eaa0173a316a3e881c949935170d @thefiddler thefiddler committed May 1, 2014
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -28,12 +28,12 @@ public MouseCursorSimple()
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 @@ void Mouse_Move(object sender, MouseMoveEventArgs e)
{
if (Mouse[MouseButton.Left])
{
- AddLine(e.X, i.Y);
+ AddLine(e.X, e.Y);
}
}

0 comments on commit 60f58c2

Please sign in to comment.