117 nprintf((
"UI",
"Warning: tried to switch bitmap mask to the same bitmap\n"));
134 #ifndef HARDWARE_ONLY
210 if(
xstrs[idx] != NULL){
211 if(
xstrs[idx]->xstr != NULL){
284 if((
xstrs[idx] != NULL) && (
xstrs[idx]->assoc == owner)){
340 gadget = gadget->
next;
484 if(
xstrs[idx] == NULL){
498 if(
xstrs[idx] == NULL){
505 if(ui_x->
xstr == NULL){
513 ui_x->
assoc = _assoc;
515 ui_x->
clr = _color_type;
530 if(
xstrs[idx] == NULL){
544 if(
xstrs[idx] == NULL){
551 if(ui_x->
xstr == NULL){
570 font *f_backup = NULL;
574 if((xs == NULL) || (xs->
xstr == NULL)){
594 if(xs->
assoc == NULL){
601 if((frame != -1) && (frame < 3)){
622 if((frame != -1) && (frame < 3)){
648 if(f_backup != NULL){
676 mprintf((
"\n========== WINDOW GADGETS =========\n" ));
677 mprintf((
"(Also dumped to ui.out)\n" ));
679 fp = fopen(
"ui.out",
"wt" );
682 if ( tmp->parent == NULL ) {
683 switch ( tmp->kind ) {
685 mprintf((
"UI: Button at %d,%d\n", tmp->x, tmp->y ));
686 fprintf( fp,
"UI: Button at %d,%d\n", tmp->x, tmp->y );
689 mprintf((
"UI: Keytrap at %d,%d\n", tmp->x, tmp->y ));
690 fprintf( fp,
"UI: Keytrap at %d,%d\n", tmp->x, tmp->y );
693 mprintf((
"UI: Checkbox at %d,%d\n", tmp->x, tmp->y ));
694 fprintf( fp,
"UI: Checkbox at %d,%d\n", tmp->x, tmp->y );
697 mprintf((
"UI: Radiobutton at %d,%d\n", tmp->x, tmp->y ));
698 fprintf( fp,
"UI: Radiobutton at %d,%d\n", tmp->x, tmp->y );
701 mprintf((
"UI: Scrollbar at %d,%d\n", tmp->x, tmp->y ));
702 fprintf( fp,
"UI: Scrollbar at %d,%d\n", tmp->x, tmp->y );
705 mprintf((
"UI: Listbox at %d,%d\n", tmp->x, tmp->y ));
706 fprintf( fp,
"UI: Listbox at %d,%d\n", tmp->x, tmp->y );
709 mprintf((
"UI: Inputbox at %d,%d\n", tmp->x, tmp->y ));
710 fprintf( fp,
"UI: Inputbox at %d,%d\n", tmp->x, tmp->y );
713 mprintf((
"UI: Unknown type %d at %d,%d\n", tmp->kind, tmp->x, tmp->y ));
714 fprintf( fp,
"UI: Unknown type %d at %d,%d\n", tmp->kind, tmp->x, tmp->y );
720 mprintf((
"===================================\n" ));
void gr_rect(int x, int y, int w, int h, int resize_mode)
void bm_unlock(int handle)
Unlocks a bitmap.
void add_XSTR(char *string, int _xstr_id, int _x, int _y, UI_GADGET *_assoc, int _color_type, int _font_id=-1)
GLfloat GLfloat GLfloat GLfloat h
int get_current_hotspot()
virtual void process(int focus=0)
color * Xstr_colors[UI_NUM_XSTR_COLORS][3]
void check_focus_switch_keys()
void set_foreground_bmap(char *fname)
__inline void gr_string(int x, int y, const char *string, int resize_mode=GR_RESIZE_FULL)
int lcl_get_xstr_offset(int index, int res)
int bm_get_info(int handle, int *w, int *h, ubyte *flags, int *nframes, int *fps)
Gets info on the bitmap indexed by handle.
int mouse_get_pos(int *xpos, int *ypos)
void set_ignore_gadgets(int state)
void gr_set_color_fast(color *dst)
void gr_set_bitmap(int bitmap_num, int alphablend_mode, int bitblt_mode, float alpha)
void ui_draw_box_out(int x1, int y1, int x2, int y2)
const char *(* tooltip_handler)(const char *text)
int bm_release(int handle, int clear_render_targets)
Frees both a bitmap's data and it's associated slot.
#define BMP_AABITMAP
antialiased bitmap
color Color_ui_light_green
void set_mask_bmap(char *fname)
UI_GADGET * mouse_captured_gadget
bitmap * bm_lock(int handle, ubyte bpp, ubyte flags, bool nodebug)
Locks down the bitmap indexed by bitmapnum.
int use_hack_to_get_around_stupid_problem_flag
#define UI_KIND_SCROLLBAR
void render_tooltip(char *str)
GLint GLint GLint GLint GLint x
const char * XSTR(const char *str, int index)
void _cdecl void void _cdecl Error(const char *filename, int line, SCP_FORMAT_STRING const char *format,...) SCP_FORMAT_STRING_ARGS(3
GLuint const GLchar * name
int bm_load(const char *real_filename)
Loads a bitmap so we can draw with it later.
GLubyte GLubyte GLubyte GLubyte w
void draw_one_xstr(UI_XSTR *xstr, int frame)
void palette_use_bm_palette(int n)
void create(int _x, int _y, int _w, int _h, int _flags, int _f_id=-1)
void gr_get_string_size(int *w, int *h, const char *text, int len=9999)
void capture_mouse(UI_GADGET *gadget=NULL)
ptr_u data
Pointer to data, or maybe offset into VRAM.
void ui_draw_frame(int x1, int y1, int x2, int y2)
void draw_XSTR_forced(UI_GADGET *owner, int frame)
void gr_bitmap(int _x, int _y, int resize_mode)
UI_XSTR * xstrs[MAX_UI_XSTRS]
color Color_ui_light_pink
void _cdecl gr_printf_no_resize(int x, int y, const char *format,...)
void gr_set_font(int fontnum)
int process(int key_in=-1, int process_mouse=1)
#define UI_NUM_XSTR_COLORS
UI_GADGET * selected_gadget