ID:1092265
 
(See the best response by Yusuke13.)
Problem description:

Out of curiosity, I was trying to make a window appear with position similar to an object's position (I ended up contributing 5 hours to learn many things I am not even going to need now), I figured that the position is different actually, so I tried with screen_loc and other stuff like adding the actual object to the user's screen, I read through the HUD library mechanism but have failed to understand the positioning part. I am just trying to challenge myself into doing it rather than using the HUD Group library. Also, I am also curious about mouse control and how can I get the mouse current screen position.

Thanks in advance :)
As for the window, is this what you're looking for?

And Mouse Position.

G'luck ;)
Thanks for the reply Yusuke,

I have seen these two earlier but thanks anyway.
This is what I have been testing with:

            var/playerPos = winget(src,"map","pos")
usr << playerPos
var/py = text2num(copytext(playerPos, 1, ","))
var/px = text2num(copytext(playerPos, findtext(playerPos,",")+1))
winset(usr, "label", "pos=[py],[px]")
winshow(usr, "label")


It gives me different screen positions for the object whenever its position is different (or screen size changes) but after I parse that to number and winset that as pos it does not change the position for the label. I couldn't spot my mistake.
So is it not possible to change the position of a window to be the same as a given object's/mouse screen_loc?
Best response
It may be, but that's something I've never tried. Hopefully someone like Forum_account or someone with similar abilities stumble across this post. Sorry I couldn't help. :(