Register to post in forums, or Log in to your existing account
 

 Related 
Contents
Create/Modify Setting Items
  #ALIAS
  #BUTTON
  #CLASS
  #DIRECTION
  #EDITOR
  #GAUGE
  #KEY
  #MODULE
  #NOSAVE
  #RENAME
  #STATUS
  #STWIN
  #T+
  #T-
  #TAB
  Create/Modify Settings
User Interface I/O
  #AFK
  #CMD
  #H+
  #H-
  #HISTORY
  #INPUT
  #MESSAGE
  #PICK
  #PROMPT
  #YESNO
  %pick
  %prompt
  %yesno
  User Interface I/O
Command Reference
  #nnn
  #ABORT
  #ACTION
  #ADD
  #ADDITEM
  #ADDKEY
  #AFK
  #ALARM
  #ALIAS
  #ALL
  #BACKUP
  #BEEP
  #BREAK
  #BUTTON
  #C-
  #C+
  #CALL
  #CAPTURE
  #CASE
  #CHARACTER
  #CLASS
  #CLOSE
  #CLR
  #CMD
  #COLOR
  #COM
  #CONDITION
  #CONFIGURE
  #CONNECT
  #CONTINUE
  #CR
  #CW
  #DBCLOSE
  #DBDELETE
  #DBFIRST
  #DBGET
  #DBLOAD
  #DBNEXT
  #DBOFFLINE
  #DBONLINE
  #DBPREV
  #DBPUT
  #DBRESET
  #DBSAVE
  #DDE
  #DEBUG
  #DEBUGFILE
  #DEFAULT
  #DELCLASS
  #DELITEM
  #DELKEY
  #DELNITEM
  #DESCRIBE
  #DIRECTION
  #DISCONNECT
  #DOOR
  #ECHO
  #ECHOPROMPT
  #EDITOR
  #ERASE
  #EVALUATE
  #EVENT
  #EXECUTE
  #EXECWIN
  #EXIT
  #FILE
  #FIND
  #FIRE
  #FORALL
  #FREEZE
  #FTP
  #FUNCTION
  #GAG
  #GAGBLOCK
  #GAGLOG
  #GAGOFF
  #GAGON
  #GAGSPACE
  #GAUGE
  #H-
  #H+
  #HELP
  #HIGHLIGHT
  #HISTLOAD
  #HISTORY
  #HISTSAVE
  #HOST
  #IF
  #IGNORE
  #IMAGE
  #INPUT
  #KEY
  #KILLALL
  #LAUNCH
  #LMAP
  #LOAD
  #LOCAL
  #LOCATION
  #LOG
  #LOOK
  #LOOP
  #LOOPDB
  #LOOPVIEW
  #LUA
  #MAKEROOM
  #MAKEWINDOW
  #MAP
  #MAPQUERY
  #MARK
  #MATH
  #MEDIA
  #MENU
  #MERGE
  #MESSAGE
  #MODULE
  #MOVE
  #MSS
  #MXP
  #MXPTRIG
  #NAME
  #NEW
  #NEWVAR
  #NODEF
  #NODIR
  #NOINPUT
  #NOMAP
  #NOOP
  #NOSAVE
  #OK
  #ONINPUT
  #PATH
  #PATHHIGH
  #PAUSE
  #PCOL
  #PICK
  #PLAY
  #PLUGIN
  #PORTAL
  #PRINT
  #PROMPT
  #PSUB
  #PUEBLO
  #PW
  #QUERY
  #QUEUE
  #RAISEEVENT
  #READ
  #RECALL
  #RECORD
  #REGEX
  #RENAME
  #REPEAT
  #RESET
  #RESUME
  #RESULT
  #RETRACE
  #RETURN
  #SAVE
  #SAY
  #SAYADD
  #SAYPROMPT
  #SCRIPT
  #SCROLL
  #SECTION
  #SEND
  #SENDGMCP
  #SENDPROMPT
  #SENDRAW
  #SENDSB
  #SESSION
  #SET
  #SETPROMPT
  #SHOW
  #SHOWARR
  #SHOWDB
  #SHOWPROMPT
  #SHOWTABLE
  #SIGNAL
  #SLOW
  #SORT
  #SQLCLOSE
  #SQLDB
  #SS
  #STATE
  #STATUS
  #STEP
  #STOP
  #STWIN
  #STYLE
  #SUBSTITUTE
  #SUSPEND
  #SWITCH
  #T-
  #T?
  #T+
  #TAB
  #TAG
  #TELEPORT
  #TEMP
  #TEMPVAR
  #THREAD
  #TIMER
  #TRACK
  #TRIGGER
  #TSET
  #TYPE
  #TZERO
  #UNALIAS
  #UNBUTTON
  #UNCLASS
  #UNDIR
  #UNGAG
  #UNKEY
  #UNEVENT
  #UNLOAD
  #UNLOC
  #UNMENU
  #UNPATH
  #UNPORTAL
  #UNSTYLE
  #UNTAB
  #UNTIL
  #UNTRIGGER
  #UNVAR
  #UPDATE
  #URL
  #VARFUNC
  #VARIABLE
  #VERBATIM
  #VERSION
  #VIEW
  #WAIT
  #WAITFOR
  #WAITSIGNAL
  #WAITTHREAD
  #WALK
  #WHILE
  #WINDOW
  #WITHLOC
  #WIZLIST
  #WRAP
  #WRITE
  #WRITELOG
  #YESNO
Related Links:
  #CMD
  #CLASS
  #UNMENU
  Create/Modify Settings
  Menus
  User Interface I/O
#MENU [[cmud_#MEN]] 
MENU

Syntax: #MENU command
Related: #CMD

Executes the specified menu commands. Specify each menu command exactly as displayed in the menu. For submenus, each menu must be listed separated by | characters. Thus, the Exit command is specified as File|Exit. There is no way for CMUD to fill in any dialog value, this command just executes the menu command as if the user clicked on the menus.

The #MENU command is also used to define Speed Menu items. This is used by the Export and Import functions. The syntax is:

Syntax: #MENU id|number caption {commands} class subclass

If the number is missing, the new menu item is appended to the list of menu items. Caption is the text displayed for the menu item, command is the command to execute when this menu item is selected from the right-click menu, class is the name of the class to put this menu item in, and subclass is the name of a Menu Class to use for a submenu. A caption of "-" can be used to create a seperator.

MENU examples

#MENU {File|Exit}
Exits CMUD! (You wouldn't really do this, would you?)

#MENU {Actions|Make Button}
Pops up the Make Button dialog box.

#MENU {Mapper|File|Map Creation Mode}
Switches the AutoMapper to MapMode.


Speed menu examples

#MENU Kill {kill %selword}
Defines a new speed menu item called Kill. This new menu item is appended to the speed menu. When you right-click on the MUD window, a popup menu will be displayed containing the "Kill" item. When this item is selected from the menu, the command "kill %selword" is executed. %selword is the word in the MUD window that was right-clicked on. So, if you right-click on the word "troll" and select Kill from the menu, the command "kill troll" is sent to the MUD.

#CLASS MySubMenu {menu}
#MENU "Eat bread" {eat bread}
#MENU "Eat meat" {eat meat}
#MENU "Eat %selword" {eat %selword}
#CLASS 0
#MENU "Eat" {} "" "MySubMenu"
This example creates a submenu in the right-click menu. First, a Menu Class is created using the #CLASS command. Within this special class, three menu items are created. The first one will send the "eat bread" command to the MUD, the second one will send the "eat meat" command to the MUD, and the third menu item will eat whatever word the mouse was right-clicked on, this is because expansion does not occur until the menu is displayed. Once this menu class is created, we switch back to the default class using the #CLASS 0 command. Then, within the default class, we create a top-level menu item for the right-click menu called "Eat". There is no command for this item, since it has a submenu assigned to it. The items for the submenu are taken from the "MySubMenu" class that we just created.
Viewer Comments [0 - Post your comments]

Jump to:  

© 2009 Zugg Software. Hosted by Wolfpaw.net