vis_files/button.js
/// Adds the menu buttons to the page
Adds the menu buttons to the page
Adds the menu buttons to the page
function add_menubut(menubut)
{
	for(var i = 0; i < menubut.length; i++){
		var mb = menubut[i];
		switch(mb.type){
			case "tab":
				addbutton(mb.name,mb.x,mb.y,mb.dx,mb.dy,TABBUT,TABBUT,mb.i,-1);
				break;
			case "sub":
				addbutton("",mb.x,mb.y,mb.dx,mb.dy,-1,PAGESUBBACKBUT,-1,-1);
				addbutton(mb.name,mb.x,mb.y,mb.dx,mb.dy,PAGESUBBUT,PAGESUBBUT,mb.j,-1);
				break;
			case "subsub":
				addbutton(mb.name,mb.x,mb.y,mb.dx,mb.dy,PAGESUBSUBBUT,PAGESUBSUBBUT,mb.j,-1);
				break;
			case "subsubsub":
				addbutton(mb.name,mb.x,mb.y,mb.dx,mb.dy,PAGESUBSUBSUBBUT,PAGESUBSUBSUBBUT,mb.j,-1);
				break;
			case "menuslide":
				addbutton(mb.name,mb.x,mb.y,mb.dx,mb.dy,MENUSLIDEBUT,MENUSLIDEBUT,-1,-1);
				break;
		}
	}
}
function add_menubut ( menubut ) { for ( var i = 0 ; i < menubut . length ; i ++ ) { var mb = menubut [ i ] ; switch ( mb . type ) { case "tab" : addbutton ( mb . name , mb . x , mb . y , mb . dx , mb . dy , TABBUT , TABBUT , mb . i , - 1 ) ; break ; case "sub" : addbutton ( "" , mb . x , mb . y , mb . dx , mb . dy , - 1 , PAGESUBBACKBUT , - 1 , - 1 ) ; addbutton ( mb . name , mb . x , mb . y , mb . dx , mb . dy , PAGESUBBUT , PAGESUBBUT , mb . j , - 1 ) ; break ; case "subsub" : addbutton ( mb . name , mb . x , mb . y , mb . dx , mb . dy , PAGESUBSUBBUT , PAGESUBSUBBUT , mb . j , - 1 ) ; break ; case "subsubsub" : addbutton ( mb . name , mb . x , mb . y , mb . dx , mb . dy , PAGESUBSUBSUBBUT , PAGESUBSUBSUBBUT , mb . j , - 1 ) ; break ; case "menuslide" : addbutton ( mb . name , mb . x , mb . y , mb . dx , mb . dy , MENUSLIDEBUT , MENUSLIDEBUT , - 1 , - 1 ) ; break ; } } }
Adds the menu buttons to the page
Adds the menu buttons to the page