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>button_add()</b> c_exam06 http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
BUTTON_ADD()                                                        C_EXAM06
   Adds an area to the menu as a button.

   Syntax
         nButtonNmbr = BUTTON_ADD(nMenuNum,nLeft,nTop,nRight,nBottom,nKeyCode,
                                  nKeyType,nUpdate,nColor [,cFormatString]
                                  [,nPattern])

   Arguments
         nMenuNum    Sets the number of the menu to assign the button to.
         nLeft       Sets the left horizontal coordinate for the button area
                     border.
         nTop        Sets the top vertical coordinate for the button area
                     border.
         nRight      Sets the right horizontal coordinate for the button area
                     border.
         nBottom     Sets the bottom vertical coordinate for the button area
                     border.
         nKeyCode    Sets the keyboard code that will select the button.
         nKeyType    Sets the keyboard code type specified above.
                         0 = ASCII character value is specified.
                         1 = IBM keyboard scan code is specified.
         nUpdate     Sets the highlight on or off.
                     0 = Don't highlight when mouse hits button.
                     1 = Highlight when mouse hits button.
                     2 = Highlight only if mouse cursor on button
         nColor      Button color. (-1 to 15)    [-1 = transparent]
         OPTIONAL PARAMETERS
         cFormatString  An optional SAY_FMT() string to add text to a button.
         nPattern       Button fill pattern.

   Returns
         nButtonNmbr Returns the number assigned to the button on the menu
                     stack.

   Description
         BUTTON_ADD() makes an area on the screen into a button on the menu
         stack. The area defined can be any rectangular section of the screen.

         nMenuNum is the number of the menu returned from MENU_OPEN(). The
         menu must be opened with MENU_OPEN() first or an error will occur.

         The button can be selected during a call to KEY_PRESS() or
         MENU_ONLY() by clicking the mouse within the area or, alternately, by
         hitting the key defined by nKeyCode and nKeyType. The button number
         will be returned from KP_ITEM_NO() or directly from the MENU_ONLY()
         function.

         nUpdate sets whether a line will be drawn around the area. nColor
         sets a color for the area.

         The cFormatString can be used to add a SAY_FMT() format string to the
         button. (See SAY_FMT() in chapter 8).

         nPattern sets the fill pattern for a button. It can be used to select
         a fill pattern from a menu.

See Also: BUTTON_CNT() BUTTON_CUR() BUTTON_EDT() BUTTON_HOT() CLR_BUTTON()

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