3 * $Logfile: /Freespace2/code/MenuUI/SnazzyUI.h $
8 * Header file for the Snazzy User Interface routines.
11 * Revision 1.1 2002/05/03 03:28:12 root
15 * 3 12/18/98 1:13a Dave
16 * Rough 1024x768 support for Direct3D. Proper detection and usage through
19 * 2 10/07/98 10:53a Dave
22 * 1 10/07/98 10:49a Dave
24 * 17 4/09/98 5:51p Lawrance
25 * Be able to disable sounds for certain menus
27 * 16 2/03/98 11:52p Lawrance
28 * call snazzy_flush() from game_flush()
30 * 15 12/23/97 5:28p Hoffoss
31 * Made enter key act the same as clicking the mouse button in main hall
34 * 14 9/07/97 10:06p Lawrance
35 * let snazzy code keep track of mouse status
37 * 13 8/11/97 9:48p Lawrance
38 * don't poll keyboard if not requested
40 * 12 2/25/97 11:11a Lawrance
41 * adding more functionality needed for ship selection screen
43 * 11 12/10/96 4:18p Lawrance
44 * added snazzy_menu_close() call and integrated with existing menus
46 * 10 12/09/96 2:53p Lawrance
47 * fixed bug where both the snazzy code and ui code were reading the
48 * keyboard, and the keypress from the snazzy code was being lost
50 * 9 11/21/96 7:14p Lawrance
51 * converted menu code to use a file (menu.tbl) to get the data for the
54 * 8 11/15/96 12:09p John
55 * Added new UI code. Made mouse not return Enter when you click it.
56 * Changed the doSnazzyUI function and names to be snazzy_menu_xxx.
58 * 7 11/13/96 4:02p Lawrance
59 * complete over-haul of the menu system and the states associated with
62 * 6 11/13/96 8:32a Lawrance
63 * streamlined menu code
65 * 5 11/06/96 8:54a Lawrance
66 * added revision templates, made more efficient
76 #define ESC_PRESSED -2
80 typedef struct menu_region {
81 int mask; // mask color for the region
82 int key; // shortcut key for the region
83 char text[MAX_CHAR]; // The text associated with this item.
84 int click_sound; // Id of sound to play when mask area clicked on
87 // These are the actions thare are returned in the action parameter.
88 #define SNAZZY_OVER 1 // mouse is over a region
89 #define SNAZZY_CLICKED 2 // mouse button has gone from down to up over a region
91 int snazzy_menu_do(ubyte *data, int mask_w, int mask_h, int num_regions, MENU_REGION *regions, int *action, int poll_key = 1, int *key = NULL);
92 void read_menu_tbl(char *menu_name, char *bkg_filename, char *mask_filename, MENU_REGION *regions, int* num_regions, int play_sound=1);
93 void snazzy_menu_add_region(MENU_REGION *region, char* text, int mask, int key, int click_sound = -1);
95 void snazzy_menu_init(); // Call the first time a snazzy menu is inited
96 void snazzy_menu_close();