Пример #1
0
int dlgscr_cmd(int msg, MENUID id, long param) {

	switch(msg) {
		case DLGMSG_CREATE:
			dlginit();
			break;

		case DLGMSG_COMMAND:
			switch(id) {
				case DID_OK:
					dlgupdate();
					menubase_close();
					break;

				case DID_CANCEL:
					menubase_close();
					break;

				case DID_TAB:
					setpage(menudlg_getval(DID_TAB));
					break;

				case DID_LCD:
					menudlg_setenable(DID_LCDX, menudlg_getval(DID_LCD));
					break;

				case DID_SKIPLIGHT:
					setintstr(DID_LIGHTSTR, menudlg_getval(DID_SKIPLIGHT));
					break;

				case DID_TRAMWAIT:
					setintstr(DID_TRAMSTR, menudlg_getval(DID_TRAMWAIT));
					break;

				case DID_VRAMWAIT:
					setintstr(DID_VRAMSTR, menudlg_getval(DID_VRAMWAIT));
					break;

				case DID_GRCGWAIT:
					setintstr(DID_GRCGSTR, menudlg_getval(DID_GRCGWAIT));
					break;

				case DID_REALPAL:
					setintstr(DID_REALPALSTR,
											menudlg_getval(DID_REALPAL) - 32);
					break;
			}
			break;

		case DLGMSG_CLOSE:
			menubase_close();
			break;
	}
	(void)param;
	return(0);
}
Пример #2
0
static int dlgcmd(int msg, MENUID id, long param) {

	switch(msg) {
		case DLGMSG_CREATE:
			dlginit();
			break;

		case DLGMSG_COMMAND:
			switch(id) {
				case DID_OK:
					if (dlgupdate()) {
						menubase_close();
					}
					break;

				case DID_CANCEL:
					menubase_close();
					break;

				case DID_PARENT:
					file_cutname(filesel.path);
					file_cutseparator(filesel.path);
					dlgsetlist();
					menudlg_settext(DID_FILE, NULL);
					break;

				case DID_FLIST:
					if (param) {
						return(dlgcmd(DLGMSG_COMMAND, DID_OK, 0));
					}
					else {
						dlgflist();
					}
					break;
			}
			break;

		case DLGMSG_CLOSE:
			menubase_close();
			break;

		case DLGMSG_DESTROY:
			listarray_destroy(filesel.flist);
			filesel.flist = NULL;
			break;
	}
	(void)param;
	return(0);
}
Пример #3
0
void dlgsnd()
{
	Sound sndmenu[sizeof(res_snd)/sizeof(res_snd[0])];
	int n;

	menu_index = 0;
	memset(dlg_val, 0, sizeof(dlg_val));
  
	dlginit();

	for (;;) {
		n = create_menu(sndmenu);

		if (snd_menu(sndmenu, n) < 0)
			break;
	}

	dlgupdate();
}
Пример #4
0
int dlgcfg_cmd(int msg, MENUID id, long param) {

	switch(msg) {
		case DLGMSG_CREATE:
			dlginit();
			break;

		case DLGMSG_COMMAND:
			switch(id) {
				case DID_OK:
					dlgupdate();
					menubase_close();
					break;

				case DID_CANCEL:
					menubase_close();
					break;

				case DID_CLOCK1:
				case DID_CLOCK2:
					setclockstr();
					break;

				case DID_MULTIPLE:
					setmulstr();
					setclockstr();
					break;

				case DID_BUFFER:
					setbufstr();
					break;
			}
			break;

		case DLGMSG_CLOSE:
			menubase_close();
			break;
	}
	(void)param;
	return(0);
}