ID:273203
 
Ok Im having a little trouble figureing this out. I have two windows that open on login, but there on top of each other. What can i do to make them appear side by side?
Are they interface, or just regular windows?
In response to Dark Prince X
Interface Windows.
In response to National Guardsmen
You can simply move them through there then. Align them to the part of the screen that you want them to pop up in.
In response to Dark Prince X
Dark Prince X wrote:
You can simply move them through there then. Align them to the part of the screen that you want them to pop up in.

Ok please exlain that just a little better. Are you refering to something i do inside of the interface editor or during the game? Because i need them not to be stacked on each other at creation.
In response to National Guardsmen
Bump. I really need a solution to this probelm.
In response to National Guardsmen
Not exactly sure, try looking up pos in the skin reference see if thats any help
In response to Leur
Ok referance says that pos can be used to adjust a "Main". I imagine it is set with winset() but pos is set with X and Y cords. So would the cords. be based on a users resolution or what?
This is my CenterForm function. I stripped out the logic which centers a form to the desktop to simplify it. I didn't scrub it (or minimize it) but it should give you an idea about how to position one window relative to another. Hope this helps.

ts

mob
{
proc
{
//
// offsetX/Y allow you to offset it from the formNameToCenterOn.
//
Mob_CenterForm(var/formNameToCenter, var/formNameToCenterOn = null, var/offsetX = 0;, var/offsetY)
{
var/formSize = winget(src, formNameToCenterOn, "size");
var/delimiter = findtext(formSize, "x");
var/parentFormWidth = text2num(copytext(formSize, 1, delimiter));
var/parentFormHeight = text2num(copytext(formSize, delimiter + 1, 0));
var/formPos = winget(src, formNameToCenterOn, "pos");
delimiter = findtext(formPos, ",");
var/formX = text2num(copytext(formPos, 1, delimiter));
var/formY = text2num(copytext(formPos, delimiter + 1, 0));
formSize = winget(src, formNameToCenter, "size");
delimiter = findtext(formSize, "x");
var/formWidth = text2num(copytext(formSize, 1, delimiter));
var/formHeight = text2num(copytext(formSize, delimiter + 1, 0));

winset(src, formNameToCenter, "pos=[formX + ((parentFormWidth / 2) - (formWidth / 2))],[formY + ((parentFormHeight / 2) - (formHeight / 2))]");
}
}
}
In response to Tsfreaks
Thanks. BYOND really shuld have a easier way to do this. In the Interface editor we should be able to drag the Window to the section of screen we wish it to appear in.
In response to National Guardsmen
Programming isn't supposed to be easy all the time. Sometimes you have to do the leg work in order to earn the title of "Developer". :) Most of the time, you should want to do the work because you can do it better anyway, right? :)

ts
In response to Tsfreaks
I updated my function. I had accidentally added "function" (JavaScript) and didn't include mob/proc to help newer devs out.

ts
In response to Tsfreaks
Yes i understand what your saying, but it just seems like this would be a added feature. Anyways thanks i grasp what i need to do now.