ID:158400
 
I didn't see it in guide, and I figure I use winset, but how do I use it to hide/show a Menu?

Edit:
Let me explain, inside of my "menu" menu file, is a section called "GM" thatI would like to completely disappear for non-GMs, and GMs, I tried is-visible=false, but it does not work despite using the interface ID. How do I show/hide it? Thank you.
Try changing the menu parameter for the Main window.
From the skin reference:
"Menus can be changed at runtime just like controls. They support a more limited set of parameters. To alter a menu item or add items under it, it needs to have an ID. These are the parameters that can be changed using winset():
  • name
  • command
  • index
  • is-disabled
  • is-checked
  • can-check
  • group
  • "


Which means that is-visible is not supported.
You could (is-)disable(d) it on the fly.

If you do not want to have a grey GM menu for your players, you could always dynamically create the GM menu for GMs on the fly, as the skin reference mentions:

"A new item can be added to a menu at runtime by including a parent parameter, which points to the ID of a menu or one of the items in it. If you have a menu with an ID of "mainmenu", for instance, this will add a Players menu beneath it:

winset(usr, "playersmenu", "parent=mainmenu;name=Players")
for(var/client/C)
var/itemname = "playermenu_[C.ckey]"
var/command = "view [C.ckey]"
winset(usr, itemname,\
"parent=playersmenu;name=[url_encode(C.key)];command=[url_enc ode(command)]")

Menu items that were added this way can also be deleted again by setting their parent to a blank value."