virtual res + borders = mousey problem

BlitzMax Forums/BlitzMax Programming/virtual res + borders = mousey problem

Snixx(Posted 2009) [#1]
using some of sswifts code i have the virtual resolution and borders working but im having problems getting the correct mousey coords as its out due to the borders, i cannot seem to fix this so has anyone else sorted it?


GfK(Posted 2009) [#2]
Haven't looked at that code in a while, but didn't it have its own mousex/y methods that do the calculations for you? Or is that the bit that doesn't work?


Snixx(Posted 2009) [#3]
I did give that a go but it fails when used with the borders sadly.

edit: reason being I gotta use offset after the borders to center the actual display.


Amon(Posted 2009) [#4]
Can't you minus the border location from the mouse position?

MouseX() = MouseX() - BorderlocationXLeft etc

A bit like minusing the a buttons position from the mouseposition for menu graphic selection???


sswift(Posted 2009) [#5]



sswift(Posted 2009) [#6]



sswift(Posted 2009) [#7]



sswift(Posted 2009) [#8]



sswift(Posted 2009) [#9]
Sorry I don't have time to debug your code, but that's the latest version of the code, maybe I fixed whatever the problem is you're having somewhere along the way.


Snixx(Posted 2009) [#10]
Ahhh thanks , I got it sorted in the end