static void feel_about(Dialog *d, int mouse) { if(mouse) if(!(press_button(d))) return; dialog_done=1; restore_under_dialog(); about(); }
static void feel_palette(Dialog *d, int mouse) { char buff[128]; char extenders[11][4] = { "VGP", "PAL", "", "", "", "", "", "", "", "", "", }; char drive[XF_MAX_DRIVE]; char dir[XF_MAX_DIR]; char fname[XF_MAX_FNAME]; char ext[XF_MAX_EXT]; if(mouse) if(!(press_button(d))) return; dialog_done=1; restore_under_dialog(); for(;;) { if (mtl_palpath[strlen(mtl_palpath)-1]=='\\') mtl_palpath[strlen(mtl_palpath)-1]=0; gfx_file_selector("VanGogh Palette File", mtl_palpath, mtl_palname, extenders, buff); if (!*buff) return; if (access(buff,0) != 0) { gfx_continu_line("Palette file doesn't exist"); } else break; } _splitpath(buff,drive,dir,fname,ext); strcpy(mtl_palpath,drive); strcat(mtl_palpath,dir); strcpy(mtl_palname,fname); strcat(mtl_palname,ext); }
void TipButton::feel( int mouse ) { init_dialog( Tip, NULL, NULL ); ready_dialog( Tip, NULL, NULL, tip_feel, NULL, NULL, NULL ); center_dialog( Tip ); save_under_dialog( Tip ); draw_dialog( Tip ); //CRASH//debug( "Render icon" ); gfx_blit( kyle_icon_data, Tip[ICON].sx, Tip[ICON].sy, Tip[ICON].width, Tip[ICON].height, 15 ); _nTipOfTheDay = rand() % _nTips; drawTipText(); do_dialog( Tip, -1 ); restore_under_dialog(); dialog_done = 0; // override inside dialog box's setting }