RPG Starter

by Falacy
An Open Source Demo/Game with everything you'll need to get started on your very own BYOND Game!
ID:292242
 
I want to create a tooltip which shows skin under mouse pointer but i cant get it to show it on correct place
heres my code
mob/proc/GetScreenX(var/atom/A)
return A.x-src.x
mob/proc/GetScreenY(var/atom/A)
return A.y-src.y
mob/proc
ToolTip(var/Desc,var/Name)
if(!src.ToolTipsOn) return
var/X=usr.GetScreenX(src);var/Xoff=src.pixel_x
var/Y=usr.GetScreenY(src);var/Yoff=src.pixel_y
X*=32;Y=(17-Y)*32
winset(usr,"ToolTipWindow.NameLabel","text=\"[Name]\"")
winset(usr,"ToolTipWindow.DescLabel","text=\"[Desc]\"")
winset(usr,"ToolTipWindow","pos=[16+X+Xoff],[38+Y-Yoff];is-visible=true")
src.SetFocus("MainWindow.MainMap")
CloseToolTip()
winset(src,"ToolTipWindow","is-visible=false")
SetFocus(var/Window as text)
set hidden=1
winset(src,Window,"focus=true")
Wheres it showing instead?
In response to Falacy
it is showing under hud,buttons or map but i want it to be exact location like u have done in ur hu2 before changing over to cca
In response to Marcus Spencer
If these are tool-tips for HUD elements, then you have to base the position on their screen_loc
In response to Falacy
i want to do it like you had done in your game DBZ HU2 before turing to CCA