Below is my screen positioning loop which I run under mob/Stat() [The proc won't be used otherwise]
mob
var/tmp
maximize
verb
ExitFullScreen()
set hidden=1;
winset(usr,"1-main","titlebar=true;is-maximized=false");
maximize=0;
Stat() //Using temporary to update window
stat(world.cpu);
var/screenvars=params2list(winget(src,"1-main","pos;size;is-maximized;titlebar"));
var/pos[2];
var/size[2];
var/offsets[2];
for(var/X in screenvars)
stat("Screenvars",X);
stat(screenvars[X]);
switch(X)
if("pos")
var/POS=screenvars[X];
var/comma=findtext(POS,",");
var/pX=copytext(POS,1,comma);
var/pY=copytext(POS,comma+1);
pos[1]=text2num(pX);
pos[2]=text2num(pY);
if("size")
var/SIZE=screenvars[X];
var/comma=findtext(SIZE,"x");
var/sX=copytext(SIZE,1,comma);
var/sY=copytext(SIZE,comma+1);
size[1]=text2num(sX)
size[2]=text2num(sY)
if("titlebar")
if(screenvars[X]=="true")
offsets[1]=8;
offsets[2]=32;
else
offsets[1]=8
offsets[2]=8
if("is-maximized")
if(screenvars[X]=="true")
if(!maximize)
maximize=1;
winset(usr,"1-main","titlebar=false;is-maximized=false;pos=0,0")
winset(usr,"1-main","is-maximized=false;size=999999x999999");
spawn(1)
winset(usr,"1-main","is-maximized=true");
stat("pos","[pos[1]] by [pos[2]]")
stat("size","[size[1]] by [size[2]]")
winset(src,"4-fade","pos=[pos[1]+offsets[1]],[pos[2]+offsets[2]];size=[size[1]]x[size[2]]");
winset(src,"5-quests","pos=[pos[1]+offsets[1]+size[1]-150],[pos[2]+offsets[2]+size[2]/6]");
var/commvars=winget(src,"3-comms","size");
if(commvars)
var/SIZE=commvars
var/split=findtext(SIZE,"x")
var/sX=copytext(SIZE,1,split)
var/sY=copytext(SIZE,split+1)
if(text2num(sX)<640)sX=size[1];
else sX=640;
sY=112;
var/pX=pos[1]+offsets[1]+size[2]/2;
if(sX/1.5+pos[1]>pos[1]+size[1]/2)pX=pos[1]+offsets[1]
winset(usr,"3-comms","pos=[pX],[pos[2]+size[2]-sY+offsets[2]-100];size=[sX]x[sY];");
What's happening is I'm updating the positioning each tick, the problem is if you're moving the main window there's a drag...
Now, the reason I'm using this method instead of slapping the window to overlay the map is because I use transparency in all my windows. Even a light transparency will help the window blend into the environment.
Thoughts? Is there a better way?
You will need:
1) A hidden output element on top of your map.
2) A screen object that shows the most recent chat messages using maptext.
Rig up the screen object so that when you mouse over it on the map, it shows the hidden output element and covers the screen object.
When you detect that the client is mousing back over the screen, hide the output element again and show the maptext.
That way you get the look of transparent text when the client doesn't want to interact with it, plus the scrollable window, selectable text, and other bullshit when the client wants to interact with the chat.
It will still look like shit, but it will do the job and won't murder renderer and server performance like what you are doing will.
Nobody is sold on a game by how pretty their chat window is.