Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Position Mouse Bug

Author
Message
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 13th Feb 2011 01:35
Hello,

Not sure why I'm just now having problems with this after using DBP and this command for 6+ years, but it seems that using position mouse in conjunction with mousex() and mousey() gives the wrong position. Try this code:


Is it doing it for anyone else? It seems to do it at all resolutions, full screen and windowed. I can't figure out what could be causing it to have such weird numbers like 808 for the x coordinate when the screen width()/2 is returning the correct number.


Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 13th Feb 2011 02:33 Edited at: 13th Feb 2011 02:39
I'd report that to Lee in the U77 release candidate thread. Here's your snippit with a small tweak to help show that the mousex and mousey functions are returning the wrong coordinates when used in combination with position mouse.



Edit: Actually, I think the mousex and mousey functions return the desktop screen coordinates of the mouse when using the position mouse command. Whether or not it's supposed to do that I don't know.

A clever person solves a problem, a wise person avoids it - Albert Einstein
thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 13th Feb 2011 02:40 Edited at: 13th Feb 2011 02:42
I get this too, it seems like it is a bug.

Quote: "Edit: Actually, I think the mousex and mousey functions return the desktop screen coordinates of the mouse when using the position mouse command. Whether or not it's supposed to do that I don't know.
"

That does seem to be what it's doing...

Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 13th Feb 2011 02:43 Edited at: 13th Feb 2011 02:48
Okay, reported it in the U77 release thread, just wanted to make sure it wasn't only me before doing so . Yeah, I thought it might be the desktop position too, but I'm not sure, and I don't still don't think it should be doing that anyways.

EDIT: Yes, it does seem to be the desktop position, but, like I said, I don't think it's supposed to do that.


Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 13th Feb 2011 03:03 Edited at: 13th Feb 2011 03:06
bugged but i also like the posibilities with it. ie, new input features?

desktop mousex()
desktop mousey()
position desktop mouse x,y

then might as well add:

clickmouse(1,2,4,8)

ah, well...

add: when setting resolution/mode under program settings, all but Fullscreen Exclusive carries the error, as well (using set display mode didn't help, either).

note: my dbpro version is 7.5. did you add yours to the bug report?

Virtual Nomad @ California, USA . DBPro V7.5
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 13th Feb 2011 06:55 Edited at: 13th Feb 2011 07:21
My compiler version is U77 RC4 and it came up with errors, downloading RC5 now.

Just tested with RC5 and the same thing happens.

A clever person solves a problem, a wise person avoids it - Albert Einstein
CodemanV
18
Years of Service
User Offline
Joined: 25th Aug 2005
Location: South Wales Valleys, UK
Posted: 13th Feb 2011 07:24
Hello

It's the same in U77 RC5.

@Virtual Nomad
Many moons ago, I did a Code-Snippet that covered the desktop mouse.

let me get a Code-Snippet shovel a moment ......

http://forum.thegamecreators.com/?m=forum_view&t=78262&b=6

All the best

Login to post a reply

Server time is: 2024-03-29 01:36:17
Your offset time is: 2024-03-29 01:36:17