mob/verb/Showhide()
var/H = winget(src,"main","not-visible")
var/S = winget(src,"main","visible")
if(H == "False")
winshow(src,"main",1)
else
if(S == "True")
winshow(src,"main",0)
ID:156669
![]() Aug 18 2010, 8:35 am (Edited on Aug 18 2010, 9:37 am)
|
|
Okay, here I have a code, that I want to show/hide a window. This is practice, but for some reason, it won't work, and I'm new to winset/show/get, etc, so it might be something stupid I'm forgetting
|
There are no such control parameters as 'visible' and 'not-visible' as far as I'm aware. Nor does it make sense for there to be 2 parameters for the same thing, or to query 2 params for the same thing.
If you read the Skin Reference, you'll see that the parameter you want is is-visible. There's another problem. You're directly comparing the result of winget() to the strings "False" and "True". Comparing strings with the == operator amounts to a case sensitive comparison, and the values boolean parameters have are "true" and "false". |
It's useful to link people to the reading material
(yes, it's supposed to be redundant, but sadly it's not as people don't have the common sense to go to it on their own). However, I wonder if you've noticed you've linked to your own local version, on your HDD... =P Incidentally, it can work provided the viewer copies and goes to the address manually (or you manually make it a hyperlink) and the viewer has BYOND installed in the same folder you do (which is less likely in this case because you have a x86_64 system which uses a different default folder than x86_32 systems). And all this paragraph just to say: it's indeed much more useful to link to the online version instead. ;) True that it's relatively buried, as there isn't a link to it directly in the Developers menu, only to the 'language reference'. I believe I've requested for it to be added there in the past... |
was wondering if there's a way to make the test window not pop-up when I start the game.
maybe under login, something like winset(src,"main",is-visible = false) ^doubt that one, or winshow(src,"main",0) <-----I'm thinking this one is right. That's just a guess |
Yes, I could not seem to find it...Also Kaioken, you better renew your membership so I can know who you are by the icon next to your name! :P
|
Chaorace wrote:
was wondering if there's a way to make the test window not pop-up when I start the game.^^^^^^^^^^^^^^^^^ Do you guys think that would work? |
I got another Question about showing/hiding windows.
Like, can I use winshow to show the OOC box which is in another window to be defaulted like the main window, so you don tgotta click on the ooc box to switch to that window to type. And still be able to move while typing thing. |
Chaorace wrote:
was wondering if there's a way to make the test window not pop-up when I start the game. Like, un-checking the 'visible' box when creating the window in the interface editor? |
file:///C:/Program%20Files%20(x86)/BYOND/help/ref/ skinparams.html