ID:140031
 
Code:
mob/Login()
winset(src, "default","size = 500x500")
mob/verb
NewChar()
set hidden = 1
winset(usr, "default.login","is-visible=false")
winset(usr, "default.new","is-visible=false")
winset(usr, "default.load","is-visible=false")
winset(usr, "default.delete","is-visible=false")
winset(usr, "default","is-maximized=true")
world << "[usr] has logged in."


Problem description:
Basically what I have here is a weird little login thing that I came up with. I used the default window, and put a label in front of everything, then put 3 buttons in front, one for new, one for load, and one for delete. The image for the login screen is 500x500, and I want the window to be at full size after you log in. All of this works, but the window does not stay at 500x500, like I stated for it to do in the code. I have the label image set to stretch, so it stretches across the entire screen. All in all, it looks very bad, and I want to know what I am doing wrong so I may fix it.

There is more code to this; but it is irrelevant.
May I wonder why you are using such a complicated set-up?
Just create one main window and fill it with an anchored child element. Create two panes, one for the actual game, one for the Log-in scenario.
This setting allows you to simply switch between the two and yet keep all the neat anchoring functionality that BYOND provides you.
In response to Schnitzelnagler
Thanks for the advice, I will use that. But my main question was about changing the window size during run-time. Why won't it work?(I went to the skin reference about the size parameter, and it appears it only works for controls, not windows. So what should I use instead?)
In response to Albro1
The reason is because your setting is maxamized. This uses the full desktop space to display the screen.
        winset(usr, "default","is-maximized=true")
In response to Pirion
I know about this. Like stated before, I have a login Label with a picture, and 3 buttons. At this point(The login) the window should be 500x500. The Button that says New uses the NewChar() verb, which THEN maximizes the window. This is why I do not see the problem.
In response to Albro1
then make sure the skin isnt defultly maxamized.
In response to Pirion
I think I have narrowed it down...sort of...It seems to "remember" what size it was at when I logged out, because if I change the skin at all, it works, I log in, log out, and I log back in to it being maximized. My first thought was to set the window size back to 500x500 on Logout(), but it did not work.
In response to Albro1
As you have sorta surmised, is-maximized is one of the params that is saved between sessions. So, all you should have to do is winset(usr, "default","is-maximized=false") in your mob/Login() process.
In response to DarkCampainger
Aaah, thanks. I will try that.

EDIT: Thanks. It worked.