world
New()
..()
spawn(world.tick_lag)
align()
proc
align()
for(var/mob/M in world)
spawn while(M)
if(!M){return}
var/a=winget(M,"Main","pos")
var/chatx=text2num(copytext(a,1,","))
if(!M){return}
var/chaty=text2num(copytext(a,findtext(a,",")+1))
winset(M,"Output","pos=[chatx+14],[chaty+672]")
winset(M,"Input","pos=[chatx+103],[chaty+799]")
Problem description:
I Have a transparent chat box as a screen obj then i got a Output&Input in the interface that i made transparent so as you chat they look like they are fitting perfectly on the chat box in which they do and the code above keeps the input and output aligned.
my question is, is there a more Efficient/Faster/cleaner way to do this.
Not on the server, no. You can do this on the client, though using javascript.