Make the EvMenu docs look a little cleaner.

This commit is contained in:
Ahmed Charles 2015-10-17 19:44:20 +00:00 committed by Griatch
parent 53ec675960
commit 5fa9978e1a

View file

@ -54,18 +54,19 @@ The return values must be given in the above order, but each can be
returned as None as well. If the options are returned as None, the returned as None as well. If the options are returned as None, the
menu is immediately exited and the default "look" command is called. menu is immediately exited and the default "look" command is called.
text (str, tuple or None): Text shown at this node. If a tuple, the second text (str, tuple or None): Text shown at this node. If a tuple, the
element in the tuple is a help text to display at this node when second element in the tuple is a help text to display at this
the user enters the menu help command there. node when the user enters the menu help command there.
options (tuple, dict or None): ( {'key': name, # can also be a list of aliases. A special key is "_default", which options (tuple, dict or None): (
# marks this option as the default fallback when no other {'key': name, # can also be a list of aliases. A special key is
# option matches the user input. # "_default", which marks this option as the default
'desc': description, # option description # fallback when no other option matches the user input.
'desc': description, # optional description
'goto': nodekey, # node to go to when chosen 'goto': nodekey, # node to go to when chosen
'exec': nodekey, # node or callback to trigger as callback when chosen. If a node 'exec': nodekey}, # node or callback to trigger as callback when chosen.
# key is given the node will be executed once but its return u # If a node key is given, the node will be executed once
# values are ignored. If a callable is given, it must accept # but its return values are ignored. If a callable is
# one or two args, like any node. # given, it must accept one or two args, like any node.
{...}, ...) {...}, ...)
If key is not given, the option will automatically be identified by If key is not given, the option will automatically be identified by