wonky mouse

Thoughts on the further development of Haven & Hearth? Feel free to opine!

Re: wonky mouse

Postby loftar » Tue Jul 07, 2009 5:15 am

theTrav wrote:One work around is to create a hardware mouse with 100% transparency, create a mouse listener to receive position updates and then draw the pretty colored cursor manually.
It won't be quite as smooth visually as a mouse that's entirely hardware, however it'll move about with the same smoothness as a hardware mouse does.

Yeah, that's what it's doing currently, only the cursor is only being drawn at the end of each draw cycle, so that's why it follows the FPS.

Your link tipped me about the "getMaximumCursorColors" (don't you just love those AWT names...?) function, though, so I added separate modes to draw the cursor in hardware if the toolkit supports 256 colors or more. Since the toolkit on my system only supports 2 colors, I haven't been able to test it, but I hope those who are having trouble with it find their systems capable of it.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: wonky mouse

Postby kimya » Tue Jul 07, 2009 6:09 am

WTF!!!! its totally smooth now, extraordinary, amazing, perfect!! YEEEESSSSSSSS
if i knew you in rl youd get a peck :P THAAAANKS!
kimya
 
Posts: 845
Joined: Mon Jun 01, 2009 1:35 am

Re: wonky mouse

Postby kimya » Tue Jul 07, 2009 6:21 am

so, after the first euphoria:

dunno if its because of that recent change, but if i click on the "craft" button, for example, my char walks to that point, instead of crafting. i either have to hit a certain area to actually ->click<- or its random, i havent found out yet. but it makes querning wheatseads quite hard, as my char always walks away from the quern...

/edit
not only the craft button, also the others like inventory, charsheet, the "x" to close a window...

/edit #2

I guess i know whats the problem. the click point of the cursor is not the tip of the arrow, but the middle of it. like, if the cursor was a spot or a cross, it would totally make sense.

/edit #3
actually the click point is in the mittle of the arrowhead.
enough testing for now :)
Last edited by kimya on Tue Jul 07, 2009 6:38 am, edited 6 times in total.
kimya
 
Posts: 845
Joined: Mon Jun 01, 2009 1:35 am

Re: wonky mouse

Postby theTrav » Tue Jul 07, 2009 6:22 am

loftar wrote:"getMaximumCursorColors" (don't you just love those AWT names...?)


I don't see anything wrong with that name... Perfectly cromulent to me
User avatar
theTrav
 
Posts: 3464
Joined: Fri May 29, 2009 11:25 pm

Re: wonky mouse

Postby loftar » Tue Jul 07, 2009 2:05 pm

kimya wrote:I guess i know whats the problem. the click point of the cursor is not the tip of the arrow, but the middle of it. like, if the cursor was a spot or a cross, it would totally make sense.

I got hold of a few different Windows computer, and it seems that the problem manifests itself on Vista and 7, but not on XP. Can this be verified to be true?
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: wonky mouse

Postby niltrias » Tue Jul 07, 2009 4:53 pm

I can check that on my laptop tomorrow. I normally run this on my server, hence the terrible spelling/punctuation/capitalization. I{ll let you know.

There goes another one. On a civilized keyboard, that would have been an apostrophe.
<Marcher Lord>
Dogs! Oh god, please give us DOGS!
There are those who press on with the ardor of beer, and those who are faint with thirst.
User avatar
niltrias
 
Posts: 1559
Joined: Sat May 30, 2009 10:19 am

Re: wonky mouse

Postby Rift » Tue Jul 07, 2009 5:05 pm

yeah. confirmed that my vista computer has the mouse offset a bit from teh tip [making me click those little x's with greater difficulty]
Rift
 
Posts: 683
Joined: Mon Jun 01, 2009 1:34 am

Re: wonky mouse

Postby loftar » Tue Jul 07, 2009 5:21 pm

I think I might have figured it out, actually. I think that the cursor isn't actually wrong; rather, the entire drawing area seems to be stretched on Vista. Probably, the window is created larger than it should be, for some reason (Java does seem to have some issues with that), so that the actual window is larger than 800x600, while Haven's logical drawing area is still 800x600. Therefore, there is a discrepancy between window coordinates and logical coordinates which grows with the distance from the upper left corner of the window. It wasn't noticeable in the cursor previously, since the logically drawn cursor would still match up with the clicked coordinates.

Now to find out why the window is created with the wrong size on Vista...
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: wonky mouse

Postby Jfloyd » Tue Jul 07, 2009 6:29 pm

Rift wrote:yeah. confirmed that my vista computer has the mouse offset a bit from teh tip [making me click those little x's with greater difficulty]

Yay! Now when loftar fixes it, I'll actually be able to pick up items!
"When I grow up, I want to be just like Kaka" -James Floyd, on growing up.
User avatar
Jfloyd
 
Posts: 995
Joined: Tue Jun 09, 2009 3:51 am

Re: wonky mouse

Postby Rift » Tue Jul 07, 2009 6:31 pm

you can now.. you just have to figure out what the offset is given how far from the corner you are... or.. just click a few times trying to click with the point to the center of the pointer.
Rift
 
Posts: 683
Joined: Mon Jun 01, 2009 1:34 am

PreviousNext

Return to Critique & Ideas

Who is online

Users browsing this forum: No registered users and 8 guests