Open source remastering of the Freespace 2 engine
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
12 #ifndef _SNAZZYUI_H
13 #define _SNAZZYUI_H
15 #define MAX_CHAR 150
16 #define ESC_PRESSED -2
18 #include "globalincs/pstypes.h"
20 typedef struct menu_region {
21  int mask; // mask color for the region
22  int key; // shortcut key for the region
23  char text[MAX_CHAR]; // The text associated with this item.
24  int click_sound; // Id of sound to play when mask area clicked on
27 // These are the actions thare are returned in the action parameter.
28 #define SNAZZY_OVER 1 // mouse is over a region
29 #define SNAZZY_CLICKED 2 // mouse button has gone from down to up over a region
31 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);
32 void read_menu_tbl(char *menu_name, char *bkg_filename, char *mask_filename, MENU_REGION *regions, int* num_regions, int play_sound=1);
33 void snazzy_menu_add_region(MENU_REGION *region, const char* text, int mask, int key, int click_sound = -1);
35 void snazzy_menu_init(); // Call the first time a snazzy menu is inited
36 void snazzy_menu_close();
37 void snazzy_flush();
39 #endif
#define MAX_CHAR
Definition: snazzyui.h:15
void snazzy_flush()
Definition: snazzyui.cpp:29
int key
int mask
Definition: snazzyui.h:21
void read_menu_tbl(char *menu_name, char *bkg_filename, char *mask_filename, MENU_REGION *regions, int *num_regions, int play_sound=1)
Definition: snazzyui.cpp:178
void snazzy_menu_add_region(MENU_REGION *region, const char *text, int mask, int key, int click_sound=-1)
Definition: snazzyui.cpp:163
void snazzy_menu_init()
Definition: snazzyui.cpp:34
int click_sound
Definition: snazzyui.h:24
struct menu_region MENU_REGION
unsigned char ubyte
Definition: pstypes.h:62
char * mask_filename
void snazzy_menu_close()
Definition: snazzyui.cpp:276
GLenum GLsizei GLenum GLenum const GLvoid * data
Definition: Gl.h:1509
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)
Definition: snazzyui.cpp:59
GLenum GLint GLuint mask
Definition: Glext.h:5605
char text[MAX_CHAR]
Definition: snazzyui.h:23