Jump to content

Wobby Cursor Fix


Lathander

Recommended Posts

If anyone else is as annoyed at the wobbly cursor as I was.. you can fix it inside Client Entity.cs by adding Math.Ceiling to

destRectangle.X = (int)Math.Ceiling(GetCenterPos().X)

destRectangle.Y = (int)Math.Ceiling(GetCenterPos().Y)

 

under the DrawTarget function.

 

I'd submit a fix for bugs but I am not at my normal computer and I do not have access for a while. Damn that wobbly cursor drove me nuts, surprised I took this long to finally fix it.

Link to comment
Share on other sites

4 hours ago, Lathander said:

If anyone else is as annoyed at the wobbly cursor as I was.. you can fix it inside Client Entity.cs by adding Math.Ceiling to

destRectangle.X = (int)Math.Ceiling(GetCenterPos().X)

destRectangle.Y = (int)Math.Ceiling(GetCenterPos().Y)

 

under the DrawTarget function.

 

I'd submit a fix for bugs but I am not at my normal computer and I do not have access for a while. Damn that wobbly cursor drove me nuts, surprised I took this long to finally fix it.

Would be cool to see before/after, because the cursor looked fine to me. I guess I can always try that later.

Link to comment
Share on other sites

8 minutes ago, Shenmue said:

Would be cool to see before/after, because the cursor looked fine to me. I guess I can always try that later.

 

So, it might not be as obvious with the default intersect cursor. That said, those things stick out to me.

 

Here's before and after.

 

54612aad61ecb90158fd7c1abab52d39.gif

 

a0318483afb021ddf066c75c1077af9e.gif

 

The reason Math.Ceiling works, is because if your graphics are divisible by 2, I am assuming it is attempting to chose one of the two center pixels to place the cursor, and that changes because it isn't a central pixel. By using Math.Ceiling it chooses the higher of the two pixels.

Link to comment
Share on other sites

1 hour ago, Lathander said:

 

So, it might not be as obvious with the default intersect cursor. That said, those things stick out to me.

 

Here's before and after.

 

54612aad61ecb90158fd7c1abab52d39.gif

 

a0318483afb021ddf066c75c1077af9e.gif

 

The reason Math.Ceiling works, is because if your graphics are divisible by 2, I am assuming it is attempting to chose one of the two center pixels to place the cursor, and that changes because it isn't a central pixel. By using Math.Ceiling it chooses the higher of the two pixels.

 

Wow that's a great change! Thanks for sharing :D

Link to comment
Share on other sites

3 hours ago, Lathander said:

 

So, it might not be as obvious with the default intersect cursor. That said, those things stick out to me.

 

Here's before and after.

 

54612aad61ecb90158fd7c1abab52d39.gif

 

a0318483afb021ddf066c75c1077af9e.gif

 

The reason Math.Ceiling works, is because if your graphics are divisible by 2, I am assuming it is attempting to chose one of the two center pixels to place the cursor, and that changes because it isn't a central pixel. By using Math.Ceiling it chooses the higher of the two pixels.

 

Second one is better indeed haha

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...