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>introduction</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Introduction

  The functions in this chapter allow you to create a graphics menu system for
  your application.

  A button is an individual item within a menu. A complete menu is made up of
  any number of buttons. You can have up to 24 different menus active at the
  same time. Each button within a menu can be selected by the keyboard or a
  mouse cursor.

  You can open a menu with the MENU_OPEN() function. You indicate the font
  handle to use for the menu, so this could be a set of icons, a disk font, or
  hot areas on the graphics screen. The text used with the menu system removes
  any proportional spacing and prints labels using fixed-space fonts. So, when
  icons are printed, they will print right next to each other unless you enter
  a gap in pixels that separates the icons. You can indicate which button will
  be the default, whether a button will highlight when the mouse touches it,
  and other special enhancements. The background can be automatically saved
  and restored when finished.

  Buttons can be added to the menu with either MENU_ITEM() or BUTTON_ADD().
  MENU_ITEM() adds a text or icon as a menu item. You can place the text or
  icon at any row and column position on the screen, and it becomes selectable
  by the mouse. You also can assign an ASCII key code or a keyboard scan key
  code which will select the button when that key is pressed. BUTTON_ADD()
  allows you to place a rectangular screen area as a button within a menu.

  Menus are activated with MENU_WAKE() and deactivated with MENU_SLEEP(). When
  a menu is activated, an item within any active menu can be selected from
  within the KEY_PRESS() event handler. If KEY_PRESS() is released by an
  event, then the menu number selected can be returned with KP_MENU(). The
  last button selected either with the keyboard, mouse, or by default is
  stored with each menu and can be returned with KP_ITEM_NO().

  The default menu color can be changed with MENU_COLOR(). When a menu is
  opened, those colors are attached to that menu until it is cleared.

  MENU_ONLY() is a special menu function. When a menu is called with this
  function, all other screen and mouse operations are suspended until an item
  has been selected, thus the name menu only. The arrow keys will work by
  default with these menus.

  Menus and buttons can be changed interactively with MENU_EDIT() and
  BUTTON_EDT(). After a selection has been made from a menu, it can either be
  put to sleep for later use or cleared so another menu can take its place.

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