ID:628398
 
Resolved
The position of the default window in the skin is ignored when loading a game for the first time, so that the window is centered. Other windows retain their position, and the main window will still save the last-used position for future sessions as usual.
Applies to:Dream Seeker
Status: Resolved (496)

This issue has been resolved.
I almost submitted this as a bug report but thought it might be a good chance to address this and flip it into a positive by changing it into a proper feature.

When editing a window in the interface editor the position gets saved. Normally this might be a useful feature, but it's implemented in a silent way which causes it to backfire. As of this posting the most recent version of The Saloon was compiled by Mikau, he has a dual monitor setup. Unfortunately, while he was saving the main window it was dragged onto his second monitor. Now whenever someone joins the chatroom its window's initial position is on the far right of their screen, almost completely out of view.

Instead of automatically saving the window position when editing it Dream Maker there should be a section where you can manually set the position. Something similar to the size settings, just have x,y coordinates for where the window is positioned.

If possible it would be nice to have options like center, align left, align top, etc.
SuperAntx wrote:
If possible it would be nice to have options like center, align left, align top, etc.

I could see something like that being useful. Otherwise, you can just use a simple winset() to position windows.
This is really needed!
We also need a better way to grab the client's resolution... but I digress..
bump

This is really starting to get annoying.
Oh, it's like HUD aligning, where you can set screen_loc to directions or CENTER. Windows should definitely be able to do this too by winset()ing a window's pos.
I feel like it'd be easy for someone to whip up a library for this.
Otherwise if it was made native, I could see it being really helpful!
In response to Oasiscircle (#5)
As there's no native way to grab screen size, it gets a bit complicated. The only ways I can think of that can do so are to use JavaScript, put an invisible control in the bottom-right of the screen, or set a window's size to 9999x9999 and get the window's resulting size (it maxes at the user's screen size), but it leaves out the task bar if the game isn't full-screen (which isn't much of a problem, to me). A client variable for screen size would be best and would make making a library for this super easy.
Luckily screen size won't really change, so you'd only have to do this operation once per new client. I can't imagine it being very consuming in any fashion so I don't really see a problem with doing it that way.

I'm not saying that a native version wouldn't be extremely helpful, but as long as its reasonably effective and do-able I don't see a problem with the simple workaround at the moment.
Was this ever reported as a bug? The bug seems to be the more important part. If you want to place the window at a certain location on the screen there are ways to do that. The bug is that BYOND games can place windows off the edge of the screen and that shouldn't be possible even if this feature is added.

Being able to read the client's resolution or position windows relative to it would be nice features to have. It seems like it'd be easy enough to add a few bytes to the message when a client connects so it tells the server right away what its resolution is. That way it's not even a winget() type of thing, the server just always knows.
In response to Forum_account (#8)
Forum_account wrote:
Was this ever reported as a bug?

Na, I just think this is one of those cases where something has been designed to work weird on purpose.
In response to Forum_account (#8)
Forum_account wrote:
Being able to read the client's resolution or position windows relative to it would be nice features to have. It seems like it'd be easy enough to add a few bytes to the message when a client connects so it tells the server right away what its resolution is. That way it's not even a winget() type of thing, the server just always knows.

I'd like to point out that people do in fact change resolution mid-game, contrary to what is being said in this thread. Being able to read it on-connect is fine, but being able to force a re-read would be quite nice; at the very least, it would allow an 'If you went and resized your desktop on us, push this button and then we can re-scale the UI'.

However, that really is a separate feature request. This bug is pretty old, I remember it back when 4.0 came about, IIRC. Obviously, any application that places a window semi-offscreen is doing something wrong ;) There are probably a few different points where you want to check resolution vs. where the window is occupying:

- Upon initiating a window drag / resize / maximize.
- Upon opening a skin.
Oh, I thought this had to do with screen resolution. In that case this is even easier and I don't know why people are complaining as much?
Lummox JR resolved issue with message:
The position of the default window in the skin is ignored when loading a game for the first time, so that the window is centered. Other windows retain their position, and the main window will still save the last-used position for future sessions as usual.
I changed this issue to Dream Seeker instead of Dream Maker since the behavior that resolves this is really more of a client-side issue.