Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- GT_LIB v1.0 Reference Guide Release 1.0 - <b>a general purpose menu function.</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 A general purpose menu function.
------------------------------------------------------------------------------

 Syntax

        GT_Menu(<aOptions>,[<aValids>],[<nTop>],[<nLeft>], ;
                [<nStart>],[<cTitle>],[<cColour>],[<cBox>]) ;
            -> nOption

 Arguments:

      <aOptions> is an array of arrays. Each sub-array
      contains the menu options to be displayed. Each sub
      array is displayed alongside the previous.

      <aValids> is a parrallel array of logical values
      that specify the selectability of each option. This
      will default to all options being selectable.

      <nTop> and <nLeft> are the fixed top left corner
      for the menu. If ommited the menu is centered on
      the screen.

      <nStart> is the option to start on.

      <cTitle> is the title for the menu.

      <cColour> is the colour settings to use. If
      ommitted, the current colours are used.

      <cBox> is a character string defining the box
      characters to use. It should be eleven characters
      long.

 Returns:

      A numeric value equal to the option number selected.

 Description:

      A general purpose menu function. Allows multiple
      horizontal and verticle bars. The menu is
      optionally boxed and titled.

 Examples:

      // Simple menu with 3 options, all selectable
      // positioned at 05, 10. The Highlite will start
      // on position 2 and the title will be
      // "Security Menu". The colours are specified as
      // are the box lines.

      nOption := GT_Menu( ;
          {{  '1. Backup ', ;
              '2. Restore', ;
              'X.Exit    '}} ;
          {{.T.,.T.,.T.}}, ;
          05, ;
          10, ;
          2, ;
          'Security Menu', ;
          'R/W,N/R,W,W,N/W', ;
          '+-+|+-+| |-')

 Source: GT_MENU.PRG

 Author:  Martin Bryant

See Also: GT_CHOOSE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson