Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - alert() display message box with buttons http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 alert()             Display message box with buttons
------------------------------------------------------------------------------
 Declaration
   screen.hdr

 Syntax
   func uint alert extern
   param const char cText, ;
         const char cButtons, ;
         value byte bColor, ;
         value byte bColorSelected

 Arguments
   cText is the text to be placed in the dialog box. The text can
   be divided to lines by placing ";" character at line break positions.

   cButtons is a combined button text string. The text for the individual
   buttons is separated by ';' characters. The maximum number of buttons is
   four.

   bColor is the color attribute for the box, the message text, and
   the non-selected buttons.

   bColorSelected is the color attribute for the selected button.
   The foreground part of this attribute is used to highlight the hot key
   of the nonselected button.

 Return
   The number of the selected button, or 0 if the Escape key was pressed.

 Description
   The alert() function displays a dialog box with message text and buttons.

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc Test_alert
   @ 23, 0 ?? "Returned", ;
      alert( "Error DBFSYS/1001  Open error: nonsense.DBF;(DOS Error 2)", ;
      " Quit ; Retry ; Default ", RED_WHITE, BLUE_WHITE )
   wait
   endproc

   proc main
   Test_alert()
   endproc

See Also: popbox()

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