ID:155044
 
Normally, i would refer to the library for this, but I am currently on a network which will not allow me to access the pager, and therefore open the library.

How would I go about returning the exact location of the mouse (by pixel) as MouseEntered() is called?

Edit - Ok, i'm getting the screen_loc as one variable using params2list(), how would I separate the individual values, so instead of coordinates=="23:28,12:14", I'd like to get:
ix=23
px=28
iy=12
py=14

Anyone mind helping me out?
Well since byond MouseEntered() only updates when it enter a tile.
Well get the params and pass it to a list. and get the screen-loc.
In response to Ocean King
Ok, i'm getting the screen_loc as one variable using params2list(), how would I separate the individual values, so instead of coordinates=="23:28,12:14", I'd like to get:
ix=23
px=28
iy=12
py=14

Anyone mind helping me out?
In response to Ocean King
Still need help with this, guys...
In response to Kaamos
proc

parseScreenLoc(screenLoc)
. = new/list(4)

var/index = 0

for(var/relation in global.split(screenLoc, ","))
var/offsets[] = global.split(relation, ":")

for(var/offset = 1 to 2)
.[++ index] = (offsets.len >= offset) ? text2num(offsets[offset]) : 0

split(text, with = " ")
var/array[] = new, position

for()
position = findtext(text, with)

if(position)
array += copytext(text, 1, position)
text = copytext(text, position + lentext(with))
continue

return array + text

// Example:

var/const
ix = 1
px = 2
iy = 3
py = 4

mob/Login()

var/parsed[] = global.parseScreenLoc("23:28,12:14")
src << "ix is [parsed[global.ix]]"
src << "px is [parsed[global.px]]"
src << "iy is [parsed[global.iy]]"
src << "py is [parsed[global.py]]"


i made this for u
In response to Towers
Thanks - It was the split command I needed - I'd been trying to find something like that.