ID:1850233
 

Problem description:

Hullo. The question says it all. I've looked on the skin reference and it doesn't give an example, only that the default of size is 0x0. What I want to do is set the width and height of the the default window to 0x0 so it's not visually visible, but then when someone's loads their character or finishes creating a new character I want to maximize the default window so they can play. But I don't know what the syntax for setting sizes of windows is, and I don't know what the default width and height numbers are after I need to change them from 0x0.
You might try the "is-visible" parameter. There's even a separate proc just for setting this: winshow(). Then, to maximize it, you'd set its is-maximized to true after making it visible again.
But I have the problem of having the Options and Messages box pop up during login due to the default window not being visible. So even when someone is playing and closes the client (the default window) the Options and Message box is still up and they aren't logged out.
Sounds like you should choose your default window differently, based on the restriction that you shouldn't ever be hiding the default window.
I keep the default hidden until a person has logged in or created a character. I use a different window as the login screen since I have it so different login images show based on probability each time someone logs in. Once they login/create new char I hide the login/character creation screen and show the default (gameplay) window.

But if I use winshow() instead of winset() with is-visible=false, will I have the Options and Message box problem?
In response to Oleic
The thing is, you're not supposed to hide the main window, so the Options and Messages window acts as a substitute if you do hide the main window.

You can use a Child control to swap between the gameplay pane and the character creation pane, within the same window frame.

That's why it's called a window. You have the window frame and you can swap the glass panes.
DS's design is built around the idea that you should always have a window visible, because otherwise users can't shut it down.
In response to Lummox JR
Then the O&M window shouldn't be forced open if a non-default window is the only visible window?
In response to Kaiochao
Except closing a non-default window doesn't close the game. So the behavior would have to be altered to make that happen. I think that'd be fairly reasonable and intuitive, though.
Skins allow only one 'true' default window. While not recommended, by juggling this value around you can toggle windows and avoid the O&M message from appearing.

The 'true' default is the first appearance in the skin. Any additional windows set to default just cause the X to exit the game, and not stop the O&M window from appearing.

mob/verb/toggleShownWindow()
winset(src,"window1","is-visible=true&is-default=true")
winset(src,"default","is-default=false")
winset(src,"default","is-visible=false") //this needs to be a separate winset to stop a flicker appearing


The recommended approach is to use panes as mentioned earlier.
Sorry for the late response, I had to be in the field for training with my unit. But okay I understand more now that I've read you all's responses. I didn't want to use child controls originally out of laziness since I didn't fully understand the creation of them when I read through the four lessons of the skin tutorial, but perhaps I'll go back and read through it. Thanks for the help fellas.
In response to Oleic
Think of Child as a container. The Tab control is also a kind of container. Child can hold either one or two panes; Tab can hold any number, but only displays one at a time.

A pane is just a window that has been marked as "Is a pane". This means it no longer functions as a regular window, but is meant to be put inside a container.

(In the webclient, you don't need panes at all necessarily; you can put any control in a container.)
I understand the concept. I just don't fully understand how to use them. Like now, instead of hiding the default window to show the login screen window when someone logs on, I let the default window be visible and created a child to cover the default window. I put in the child ID to match the login screen window, and all I see during runtime is a blank grey screen. I used winset in the code to make the login screen child visible but it shows none of the .png images I have in the original login screen window.
Perhaps if you shared your skin one of us could take a look.
If it will solve my problem, I can do that.