Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Flipper 6.0 Help File - <b>menu_open()</b> c_exam04 http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
MENU_OPEN()                                                         C_EXAM04
   Opens and defines attributes for a new menu.

   Syntax
         nMenuNum = MENU_OPEN(nFont,nGap,nViewport,nDefaultActive,nHighlight,
                              nType,nSaveBackground)

   Arguments
         nFont       Sets the font number for the menu text.
         nGap        Sets the gap in pixels to place between buttons.
         nViewport   Sets the viewport to place the buttons within.
         nDefaultActive Sets the active menu button at the start.
         nHighlight  Sets highlighting on or off.
                     0 = Don't highlight menu selection when mouse is within
                         button region.
                     1 = Highlight button when mouse cursor is within button
                         region.
                     2 = Highlight button when mouse cursor is within button
                         region then turn off when mouse moves off.
         nType       Sets the menu type.
                     0 = Nothing extra besides buttons-background not saved.
                     1 = Menu accross the top of the screen with a border.
                     2 = Box around the menu, with a shadow, if defined.
                     3 = Type 2 plus boxes drawn around the available menu
                         selections.
                     4 = Adds a scroll bar
         nSaveBackground Sets whether to save the background.
                         0 = Don't save background.
                         1 = Save background for later restore when menu is
                             asleep.

   Returns
      nMenuNum       Returns the menu number for the new menu.

   Description
         Up to 24 menus can be defined, each holding its own set of buttons,
         or menu selections. Once the menu is open and its buttons defined,
         the menu can be activated with a call to MENU_WAKE() or MENU_ONLY().
         The menu operates during KEY_PRESS() or MENU_ONLY() and will return a
         menu event if a button is selected. Each menu is a fully functional
         menu system. Selecting a button with the mouse will highlight the new
         selection and lowlight the previous button.

         nGap sets the space between icons and text within a menu. The space
         is in pixels.

         nViewport sets which viewport the menu will be opened in. Normally,
         the base viewport 0 is the desired viewport because you have access
         to the entire screen.

         nDefaultActive is the button that is returned by default with
         KP_ITEM_NO() before the menu is made active.

         nHighlight sets whether a menu will highlight the button as the mouse
         passes over the text or icon. A 0 indicates not to highlight the menu
         selection when the mouse is within the button region, while a 1
         indicates to highlight the buttons when the mouse cursor is within
         the button region.

         nType sets the type of menu that will be presented. A 0 will set to
         display only the buttons, like a set of icons. A 1 indicates the menu
         is to be displayed across the top of the screen. A 2 indicates that a
         box should be drawn around the menu (with a shadow if defined with
         MENU_COLOR()). A 3 is like type 2 with boxes drawn around the
         available menu selections. A 4 adds a scroll bar to the right of the
         menu.

         nSaveBackground indicates whether to save the background under the
         menu. A 0 will not save the background, while a 1 saves the
         background for later restoring when the menu is put to sleep.

See Also: MENU_COLOR() MENU_EDIT() MENU_ITEM() MENU_ONLY()

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